| 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 InkDropDelegate* ink_drop_delegate() const { | 130 InkDropDelegate* ink_drop_delegate() const { |
| 131 return ink_drop_delegate_.get(); | 131 return ink_drop_delegate_.get(); |
| 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 |
| 140 // The button state (defined in implementation) | 143 // The button state (defined in implementation) |
| 141 ButtonState state_; | 144 ButtonState state_; |
| 142 | 145 |
| 143 // Hover animation. | 146 // Hover animation. |
| 144 scoped_ptr<gfx::ThrobAnimation> hover_animation_; | 147 scoped_ptr<gfx::ThrobAnimation> hover_animation_; |
| 145 | 148 |
| 146 private: | 149 private: |
| 147 // Returns true if this is not a top level widget. Virtual for tests. | 150 // Returns true if this is not a top level widget. Virtual for tests. |
| 148 virtual bool IsChildWidget() const; | 151 virtual bool IsChildWidget() const; |
| 149 // Returns true if the focus is not in a top level widget. Virtual for tests. | 152 // Returns true if the focus is not in a top level widget. Virtual for tests. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 166 | 169 |
| 167 // The event on which the button should notify its listener. | 170 // The event on which the button should notify its listener. |
| 168 NotifyAction notify_action_; | 171 NotifyAction notify_action_; |
| 169 | 172 |
| 170 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 173 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| 171 }; | 174 }; |
| 172 | 175 |
| 173 } // namespace views | 176 } // namespace views |
| 174 | 177 |
| 175 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 178 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |