OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 void set_ink_drop_delegate(InkDropDelegate* ink_drop_delegate) { | 130 void set_ink_drop_delegate(InkDropDelegate* ink_drop_delegate) { |
131 ink_drop_delegate_ = ink_drop_delegate; | 131 ink_drop_delegate_ = ink_drop_delegate; |
132 } | 132 } |
133 | 133 |
134 // Overridden from View: | 134 // Overridden from View: |
135 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 135 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
136 void ViewHierarchyChanged( | 136 void ViewHierarchyChanged( |
137 const ViewHierarchyChangedDetails& details) override; | 137 const ViewHierarchyChangedDetails& details) override; |
138 void OnBlur() override; | 138 void OnBlur() override; |
139 | 139 |
| 140 // Overridden from Button: |
| 141 void NotifyClick(const ui::Event& event) override; |
| 142 void OnClickCanceled(const ui::Event& event) override; |
| 143 |
140 // The button state (defined in implementation) | 144 // The button state (defined in implementation) |
141 ButtonState state_; | 145 ButtonState state_; |
142 | 146 |
143 // Hover animation. | 147 // Hover animation. |
144 scoped_ptr<gfx::ThrobAnimation> hover_animation_; | 148 scoped_ptr<gfx::ThrobAnimation> hover_animation_; |
145 | 149 |
146 private: | 150 private: |
147 // Returns true if this is not a top level widget. Virtual for tests. | 151 // Returns true if this is not a top level widget. Virtual for tests. |
148 virtual bool IsChildWidget() const; | 152 virtual bool IsChildWidget() const; |
149 // Returns true if the focus is not in a top level widget. Virtual for tests. | 153 // Returns true if the focus is not in a top level widget. Virtual for tests. |
(...skipping 18 matching lines...) Expand all Loading... |
168 | 172 |
169 // The event on which the button should notify its listener. | 173 // The event on which the button should notify its listener. |
170 NotifyAction notify_action_; | 174 NotifyAction notify_action_; |
171 | 175 |
172 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 176 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
173 }; | 177 }; |
174 | 178 |
175 } // namespace views | 179 } // namespace views |
176 | 180 |
177 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 181 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
OLD | NEW |