Commit 6c29773a authored by Tatsuhisa Yamaguchi's avatar Tatsuhisa Yamaguchi Committed by Commit Bot

Change close button style of user chooser following the spec.

Bug: 845805
Change-Id: Ia9783b8499ed61e29a7257ba25f414a7db216dc8
Reviewed-on: https://chromium-review.googlesource.com/1100727Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567599}
parent ed1035e0
...@@ -1448,6 +1448,9 @@ This file contains the strings for ash. ...@@ -1448,6 +1448,9 @@ This file contains the strings for ash.
<message name="IDS_ASH_DIALOG_DONT_SHOW_AGAIN" desc="Label for checkbox dismissing show of a dialog."> <message name="IDS_ASH_DIALOG_DONT_SHOW_AGAIN" desc="Label for checkbox dismissing show of a dialog.">
Don't show again Don't show again
</message> </message>
<message name="IDS_ASH_WINDOW_CONTROL_ACCNAME_CLOSE" desc="The accessible name for a close button on a window frame.">
Close
</message>
<!-- Power off menu --> <!-- Power off menu -->
<message name="IDS_ASH_POWER_BUTTON_MENU_POWER_OFF_BUTTON" desc="Text shown on power off button in power button menu."> <message name="IDS_ASH_POWER_BUTTON_MENU_POWER_OFF_BUTTON" desc="Text shown on power off button in power button menu.">
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/tray/tri_view.h" #include "ash/system/tray/tri_view.h"
#include "ash/system/unified/top_shortcut_button.h"
#include "ash/system/unified/top_shortcuts_view.h" #include "ash/system/unified/top_shortcuts_view.h"
#include "ash/system/unified/unified_system_tray_controller.h" #include "ash/system/unified/unified_system_tray_controller.h"
#include "ash/system/user/rounded_image_view.h" #include "ash/system/user/rounded_image_view.h"
...@@ -59,7 +60,7 @@ base::string16 GetUserItemAccessibleString(int user_index) { ...@@ -59,7 +60,7 @@ base::string16 GetUserItemAccessibleString(int user_index) {
namespace { namespace {
class CloseButton : public views::ImageButton, public views::ButtonListener { class CloseButton : public TopShortcutButton, public views::ButtonListener {
public: public:
explicit CloseButton(UnifiedSystemTrayController* controller); explicit CloseButton(UnifiedSystemTrayController* controller);
...@@ -73,12 +74,10 @@ class CloseButton : public views::ImageButton, public views::ButtonListener { ...@@ -73,12 +74,10 @@ class CloseButton : public views::ImageButton, public views::ButtonListener {
}; };
CloseButton::CloseButton(UnifiedSystemTrayController* controller) CloseButton::CloseButton(UnifiedSystemTrayController* controller)
: ImageButton(this), controller_(controller) { : TopShortcutButton(this,
// TODO(crbug.com/845805): Replace the close button icon. kOverviewWindowCloseIcon,
gfx::ImageSkia icon = IDS_ASH_WINDOW_CONTROL_ACCNAME_CLOSE),
gfx::CreateVectorIcon(kOverviewWindowCloseIcon, kMenuIconColor); controller_(controller) {}
SetImage(views::Button::STATE_NORMAL, icon);
}
void CloseButton::ButtonPressed(views::Button* sender, const ui::Event& event) { void CloseButton::ButtonPressed(views::Button* sender, const ui::Event& event) {
controller_->TransitionToMainView(true /* restore_focus */); controller_->TransitionToMainView(true /* restore_focus */);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment