| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/resources/vector_icons/vector_icons.h" | 8 #include "ash/resources/vector_icons/vector_icons.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // |icon|. |ink_drop_style| specifies which flavor of the ink drop should be | 36 // |icon|. |ink_drop_style| specifies which flavor of the ink drop should be |
| 37 // used. |accessible_name_id| corresponds to the string in | 37 // used. |accessible_name_id| corresponds to the string in |
| 38 // ui::ResourceBundle to use for the button's accessible and tooltip text. | 38 // ui::ResourceBundle to use for the button's accessible and tooltip text. |
| 39 SystemMenuButton(views::ButtonListener* listener, | 39 SystemMenuButton(views::ButtonListener* listener, |
| 40 InkDropStyle ink_drop_style, | 40 InkDropStyle ink_drop_style, |
| 41 const gfx::VectorIcon& icon, | 41 const gfx::VectorIcon& icon, |
| 42 int accessible_name_id); | 42 int accessible_name_id); |
| 43 ~SystemMenuButton() override; | 43 ~SystemMenuButton() override; |
| 44 | 44 |
| 45 // views::ImageButton: | 45 // views::ImageButton: |
| 46 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 46 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 47 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 47 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 48 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 48 const override; | 49 const override; |
| 49 bool ShouldShowInkDropHighlight() const override; | |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 // Returns the size that the ink drop should be constructed with. | 52 // Returns the size that the ink drop should be constructed with. |
| 53 gfx::Size GetInkDropSize() const; | 53 gfx::Size GetInkDropSize() const; |
| 54 | 54 |
| 55 // Defines the flavor of ink drop ripple/highlight that should be constructed. | 55 // Defines the flavor of ink drop ripple/highlight that should be constructed. |
| 56 InkDropStyle ink_drop_style_; | 56 InkDropStyle ink_drop_style_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(SystemMenuButton); | 58 DISALLOW_COPY_AND_ASSIGN(SystemMenuButton); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace ash | 61 } // namespace ash |
| 62 | 62 |
| 63 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ | 63 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ |
| OLD | NEW |