| 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..86937bed6e3d0ec0f32a05c10258be2775f749d8 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,25 @@ namespace ash {
|
| // crbug.com/614453.
|
| class SystemMenuButton : public views::ImageButton {
|
| public:
|
| + // The different ink drop styles that can be used.
|
| + enum class InkDropStyle {
|
| + // Despite the poor name this style actually displays as a circle. It is
|
| + // typically used for buttons that the user doesn't need to know the exact
|
| + // targetable rect and they are expected to target an icon centered in the
|
| + // targetable space.
|
| + SQUARE,
|
| + // Typically used for buttons that should indicate to the user what the
|
| + // actual targetable bounds are. e.g. a row of buttons separated with
|
| + // separators.
|
| + 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 +46,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.
|
| + InkDropStyle ink_drop_style_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SystemMenuButton);
|
| };
|
|
|
|
|