Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: ui/views/controls/button/custom_button.h

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/base/animation/animation_delegate.h" 8 #include "ui/base/animation/animation_delegate.h"
9 #include "ui/base/events.h" 9 #include "ui/base/events.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 explicit CustomButton(ButtonListener* listener); 102 explicit CustomButton(ButtonListener* listener);
103 103
104 // Invoked from SetState() when SetState() is passed a value that differs from 104 // Invoked from SetState() when SetState() is passed a value that differs from
105 // the current state. CustomButton's implementation of StateChanged() does 105 // the current state. CustomButton's implementation of StateChanged() does
106 // nothing; this method is provided for subclasses that wish to do something 106 // nothing; this method is provided for subclasses that wish to do something
107 // on state changes. 107 // on state changes.
108 virtual void StateChanged(); 108 virtual void StateChanged();
109 109
110 // Returns true if the event is one that can trigger notifying the listener. 110 // Returns true if the event is one that can trigger notifying the listener.
111 // This implementation returns true if the left mouse button is down. 111 // This implementation returns true if the left mouse button is down.
112 virtual bool IsTriggerableEvent(const Event& event); 112 virtual bool IsTriggerableEvent(const ui::Event& event);
113 113
114 // Returns true if the button should become pressed when the user 114 // Returns true if the button should become pressed when the user
115 // holds the mouse down over the button. For this implementation, 115 // holds the mouse down over the button. For this implementation,
116 // we simply return IsTriggerableEvent(event). 116 // we simply return IsTriggerableEvent(event).
117 virtual bool ShouldEnterPushedState(const Event& event); 117 virtual bool ShouldEnterPushedState(const ui::Event& event);
118 118
119 // Overridden from View: 119 // Overridden from View:
120 virtual void ViewHierarchyChanged(bool is_add, 120 virtual void ViewHierarchyChanged(bool is_add,
121 View* parent, 121 View* parent,
122 View* child) OVERRIDE; 122 View* child) OVERRIDE;
123 virtual void OnBlur() OVERRIDE; 123 virtual void OnBlur() OVERRIDE;
124 124
125 // The button state (defined in implementation) 125 // The button state (defined in implementation)
126 ButtonState state_; 126 ButtonState state_;
127 127
(...skipping 12 matching lines...) Expand all
140 140
141 // See description above setter. 141 // See description above setter.
142 bool request_focus_on_press_; 142 bool request_focus_on_press_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(CustomButton); 144 DISALLOW_COPY_AND_ASSIGN(CustomButton);
145 }; 145 };
146 146
147 } // namespace views 147 } // namespace views
148 148
149 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 149 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698