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

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

Issue 11299285: events: Dispatch all events through EventHandler::OnEvent from the dispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 | « no previous file | ui/base/events/event_dispatcher.h » ('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_BASE_EVENTS_EVENT_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_H_
6 #define UI_BASE_EVENTS_EVENT_H_ 6 #define UI_BASE_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 type_ == ET_TRANSLATED_KEY_RELEASE; 90 type_ == ET_TRANSLATED_KEY_RELEASE;
91 } 91 }
92 92
93 bool IsMouseEvent() const { 93 bool IsMouseEvent() const {
94 return type_ == ET_MOUSE_PRESSED || 94 return type_ == ET_MOUSE_PRESSED ||
95 type_ == ET_MOUSE_DRAGGED || 95 type_ == ET_MOUSE_DRAGGED ||
96 type_ == ET_MOUSE_RELEASED || 96 type_ == ET_MOUSE_RELEASED ||
97 type_ == ET_MOUSE_MOVED || 97 type_ == ET_MOUSE_MOVED ||
98 type_ == ET_MOUSE_ENTERED || 98 type_ == ET_MOUSE_ENTERED ||
99 type_ == ET_MOUSE_EXITED || 99 type_ == ET_MOUSE_EXITED ||
100 type_ == ET_MOUSEWHEEL; 100 type_ == ET_MOUSEWHEEL ||
101 type_ == ET_MOUSE_CAPTURE_CHANGED;
101 } 102 }
102 103
103 bool IsTouchEvent() const { 104 bool IsTouchEvent() const {
104 return type_ == ET_TOUCH_RELEASED || 105 return type_ == ET_TOUCH_RELEASED ||
105 type_ == ET_TOUCH_PRESSED || 106 type_ == ET_TOUCH_PRESSED ||
106 type_ == ET_TOUCH_MOVED || 107 type_ == ET_TOUCH_MOVED ||
107 type_ == ET_TOUCH_STATIONARY || 108 type_ == ET_TOUCH_STATIONARY ||
108 type_ == ET_TOUCH_CANCELLED; 109 type_ == ET_TOUCH_CANCELLED;
109 } 110 }
110 111
111 bool IsGestureEvent() const { 112 bool IsGestureEvent() const {
112 switch (type_) { 113 switch (type_) {
113 case ET_GESTURE_SCROLL_BEGIN: 114 case ET_GESTURE_SCROLL_BEGIN:
114 case ET_GESTURE_SCROLL_END: 115 case ET_GESTURE_SCROLL_END:
115 case ET_GESTURE_SCROLL_UPDATE: 116 case ET_GESTURE_SCROLL_UPDATE:
116 case ET_GESTURE_TAP: 117 case ET_GESTURE_TAP:
118 case ET_GESTURE_TAP_CANCEL:
117 case ET_GESTURE_TAP_DOWN: 119 case ET_GESTURE_TAP_DOWN:
118 case ET_GESTURE_BEGIN: 120 case ET_GESTURE_BEGIN:
119 case ET_GESTURE_END: 121 case ET_GESTURE_END:
120 case ET_GESTURE_DOUBLE_TAP: 122 case ET_GESTURE_DOUBLE_TAP:
121 case ET_GESTURE_TWO_FINGER_TAP: 123 case ET_GESTURE_TWO_FINGER_TAP:
122 case ET_GESTURE_PINCH_BEGIN: 124 case ET_GESTURE_PINCH_BEGIN:
123 case ET_GESTURE_PINCH_END: 125 case ET_GESTURE_PINCH_END:
124 case ET_GESTURE_PINCH_UPDATE: 126 case ET_GESTURE_PINCH_UPDATE:
125 case ET_GESTURE_LONG_PRESS: 127 case ET_GESTURE_LONG_PRESS:
126 case ET_GESTURE_LONG_TAP: 128 case ET_GESTURE_LONG_TAP:
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // This value is stored as a bitfield because the number of touch ids varies, 647 // This value is stored as a bitfield because the number of touch ids varies,
646 // but we currently don't need more than 32 touches at a time. 648 // but we currently don't need more than 32 touches at a time.
647 const unsigned int touch_ids_bitfield_; 649 const unsigned int touch_ids_bitfield_;
648 650
649 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 651 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
650 }; 652 };
651 653
652 } // namespace ui 654 } // namespace ui
653 655
654 #endif // UI_BASE_EVENTS_EVENT_H_ 656 #endif // UI_BASE_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/events/event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698