Chromium Code Reviews| Index: ash/common/system/tray/system_menu_button.h |
| diff --git a/ash/common/system/tray/system_menu_button.h b/ash/common/system/tray/system_menu_button.h |
| index 0256017800410eba85b93f61ec9bc90306dd7544..b91e9f8ad0969eb082557fa89b93f088aead5042 100644 |
| --- a/ash/common/system/tray/system_menu_button.h |
| +++ b/ash/common/system/tray/system_menu_button.h |
| @@ -10,11 +10,6 @@ |
| #include "ui/views/controls/button/button.h" |
| #include "ui/views/controls/button/image_button.h" |
| -namespace views { |
| -class InkDropHighlight; |
| -class InkDropRipple; |
| -} |
| - |
| namespace ash { |
| // A 48x48 image button with a material design ripple effect, which can be |
| @@ -24,10 +19,15 @@ namespace ash { |
| // crbug.com/614453. |
| class SystemMenuButton : public views::ImageButton { |
| public: |
| + // The different ink drop styles that can be used. |
| + enum class InkDropStyle { SQUARE, FLOOD_FILL }; |
| + |
| // Constructs the button with |listener| and a centered icon corresponding to |
| - // |icon|. |accessible_name_id| corresponds to the string in |
| + // |icon|. |ink_drop_style| specifies which flavor of the ink drop should be |
| + // used. |accessible_name_id| corresponds to the string in |
| // ui::ResourceBundle to use for the button's accessible and tooltip text. |
| SystemMenuButton(views::ButtonListener* listener, |
| + InkDropStyle ink_drop_style, |
| const gfx::VectorIcon& icon, |
| int accessible_name_id); |
| ~SystemMenuButton() override; |
| @@ -36,9 +36,15 @@ class SystemMenuButton : public views::ImageButton { |
| std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| const override; |
| - bool ShouldShowInkDropForFocus() const override; |
| + bool ShouldShowInkDropHighlight() const override; |
| private: |
| + // Returns the size that the ink drop should be constructed with. |
| + gfx::Size GetInkDropSize() const; |
| + |
| + // Defines the flavor of ink drop ripple/highlight that should be constructed. |
|
tdanderson
2016/10/27 21:21:41
Consider including a brief mention of why one woul
bruthig
2016/10/27 21:34:30
Done, added to the enum.
|
| + InkDropStyle ink_drop_style_ = InkDropStyle::SQUARE; |
|
tdanderson
2016/10/27 21:21:41
nit: I don't think initialization here is necessar
bruthig
2016/10/27 21:34:31
Removed.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(SystemMenuButton); |
| }; |