OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/views/animation/ink_drop_host.h" | 10 #include "ui/views/animation/ink_drop_host.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 void SetIcon(gfx::VectorIconId id, | 30 void SetIcon(gfx::VectorIconId id, |
31 const base::Callback<SkColor(void)>& get_text_color_callback); | 31 const base::Callback<SkColor(void)>& get_text_color_callback); |
32 | 32 |
33 // views::ImageButton: | 33 // views::ImageButton: |
34 void OnThemeChanged() override; | 34 void OnThemeChanged() override; |
35 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 35 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
36 void Layout() override; | 36 void Layout() override; |
37 bool OnMousePressed(const ui::MouseEvent& event) override; | 37 bool OnMousePressed(const ui::MouseEvent& event) override; |
38 void OnGestureEvent(ui::GestureEvent* event) override; | 38 void OnGestureEvent(ui::GestureEvent* event) override; |
39 void OnMouseReleased(const ui::MouseEvent& event) override; | 39 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 40 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 41 void OnMouseExited(const ui::MouseEvent& event) override; |
40 void NotifyClick(const ui::Event& event) override; | 42 void NotifyClick(const ui::Event& event) override; |
| 43 void OnEnabledChanged() override; |
41 | 44 |
42 private: | 45 private: |
| 46 // Updates the |ink_drop_animation_controller_|'s hover state. |
| 47 void UpdateInkDropHoverState(); |
| 48 |
43 // views::InkDropHost: | 49 // views::InkDropHost: |
44 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 50 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
45 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 51 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
46 | 52 |
47 gfx::VectorIconId id_; | 53 gfx::VectorIconId id_; |
48 base::Callback<SkColor(void)> get_text_color_callback_; | 54 base::Callback<SkColor(void)> get_text_color_callback_; |
49 | 55 |
50 // Animation controller for the ink drop ripple effect. | 56 // Animation controller for the ink drop ripple effect. |
51 scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_; | 57 scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_; |
52 | 58 |
53 DISALLOW_COPY_AND_ASSIGN(BarControlButton); | 59 DISALLOW_COPY_AND_ASSIGN(BarControlButton); |
54 }; | 60 }; |
55 | 61 |
56 #endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ |
OLD | NEW |