| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Set how long the hover animation will last for. | 54 // Set how long the hover animation will last for. |
| 55 void SetAnimationDuration(int duration); | 55 void SetAnimationDuration(int duration); |
| 56 | 56 |
| 57 void set_triggerable_event_flags(int triggerable_event_flags) { | 57 void set_triggerable_event_flags(int triggerable_event_flags) { |
| 58 triggerable_event_flags_ = triggerable_event_flags; | 58 triggerable_event_flags_ = triggerable_event_flags; |
| 59 } | 59 } |
| 60 int triggerable_event_flags() const { return triggerable_event_flags_; } | 60 int triggerable_event_flags() const { return triggerable_event_flags_; } |
| 61 | 61 |
| 62 // Sets whether |RequestFocus| should be invoked on a mouse press. The default | 62 // Sets whether |RequestFocus| should be invoked on a mouse press. The default |
| 63 // is true. | 63 // is false. |
| 64 void set_request_focus_on_press(bool value) { | 64 void set_request_focus_on_press(bool value) { |
| 65 request_focus_on_press_ = value; | 65 request_focus_on_press_ = value; |
| 66 } | 66 } |
| 67 bool request_focus_on_press() const { return request_focus_on_press_; } | 67 bool request_focus_on_press() const { return request_focus_on_press_; } |
| 68 | 68 |
| 69 // See description above field. | 69 // See description above field. |
| 70 void set_animate_on_state_change(bool value) { | 70 void set_animate_on_state_change(bool value) { |
| 71 animate_on_state_change_ = value; | 71 animate_on_state_change_ = value; |
| 72 } | 72 } |
| 73 | 73 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // because it needs to paint to a layer so it can extend beyond the bounds of | 214 // because it needs to paint to a layer so it can extend beyond the bounds of |
| 215 // |this|. | 215 // |this|. |
| 216 views::View* md_focus_ring_; | 216 views::View* md_focus_ring_; |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 218 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace views | 221 } // namespace views |
| 222 | 222 |
| 223 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 223 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |