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

Side by Side Diff: ui/events/event.h

Issue 2953643002: Replaced synthetic MouseEvent in CustomButton::AcceleratorPressed() with just an Event. (Closed)
Patch Set: Created 3 years, 6 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
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_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 bool stopped_propagation() const { return !!(result_ & ER_CONSUMED); } 289 bool stopped_propagation() const { return !!(result_ & ER_CONSUMED); }
290 290
291 // Marks the event as having been handled. A handled event does not reach the 291 // Marks the event as having been handled. A handled event does not reach the
292 // next event phase. For example, if an event is handled during the pre-target 292 // next event phase. For example, if an event is handled during the pre-target
293 // phase, then the event is dispatched to all pre-target handlers, but not to 293 // phase, then the event is dispatched to all pre-target handlers, but not to
294 // the target or post-target handlers. 294 // the target or post-target handlers.
295 // Note that SetHandled() can be called only for cancelable events. 295 // Note that SetHandled() can be called only for cancelable events.
296 void SetHandled(); 296 void SetHandled();
297 bool handled() const { return result_ != ER_UNHANDLED; } 297 bool handled() const { return result_ != ER_UNHANDLED; }
298 298
299 Event(EventType type, base::TimeTicks time_stamp, int flags);
bruthig 2017/06/21 21:40:52 Move this to line 55.
300
299 protected: 301 protected:
300 Event(EventType type, base::TimeTicks time_stamp, int flags);
301 Event(const base::NativeEvent& native_event, EventType type, int flags); 302 Event(const base::NativeEvent& native_event, EventType type, int flags);
302 Event(const Event& copy); 303 Event(const Event& copy);
303 void SetType(EventType type); 304 void SetType(EventType type);
304 void set_cancelable(bool cancelable) { cancelable_ = cancelable; } 305 void set_cancelable(bool cancelable) { cancelable_ = cancelable; }
305 306
306 void set_time_stamp(base::TimeTicks time_stamp) { 307 void set_time_stamp(base::TimeTicks time_stamp) {
307 time_stamp_ = time_stamp; 308 time_stamp_ = time_stamp;
308 } 309 }
309 310
310 private: 311 private:
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 // dispatched. This field gets a non-zero value only for gestures that are 1055 // dispatched. This field gets a non-zero value only for gestures that are
1055 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1056 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1056 // events that aren't fired directly in response to processing a touch-event 1057 // events that aren't fired directly in response to processing a touch-event
1057 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1058 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1058 uint32_t unique_touch_event_id_; 1059 uint32_t unique_touch_event_id_;
1059 }; 1060 };
1060 1061
1061 } // namespace ui 1062 } // namespace ui
1062 1063
1063 #endif // UI_EVENTS_EVENT_H_ 1064 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/button/custom_button.cc » ('j') | ui/views/controls/button/custom_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698