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

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

Issue 11414283: Revert 170641 because it broke mac-debug build. (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;
102 } 101 }
103 102
104 bool IsTouchEvent() const { 103 bool IsTouchEvent() const {
105 return type_ == ET_TOUCH_RELEASED || 104 return type_ == ET_TOUCH_RELEASED ||
106 type_ == ET_TOUCH_PRESSED || 105 type_ == ET_TOUCH_PRESSED ||
107 type_ == ET_TOUCH_MOVED || 106 type_ == ET_TOUCH_MOVED ||
108 type_ == ET_TOUCH_STATIONARY || 107 type_ == ET_TOUCH_STATIONARY ||
109 type_ == ET_TOUCH_CANCELLED; 108 type_ == ET_TOUCH_CANCELLED;
110 } 109 }
111 110
112 bool IsGestureEvent() const { 111 bool IsGestureEvent() const {
113 switch (type_) { 112 switch (type_) {
114 case ET_GESTURE_SCROLL_BEGIN: 113 case ET_GESTURE_SCROLL_BEGIN:
115 case ET_GESTURE_SCROLL_END: 114 case ET_GESTURE_SCROLL_END:
116 case ET_GESTURE_SCROLL_UPDATE: 115 case ET_GESTURE_SCROLL_UPDATE:
117 case ET_GESTURE_TAP: 116 case ET_GESTURE_TAP:
118 case ET_GESTURE_TAP_CANCEL:
119 case ET_GESTURE_TAP_DOWN: 117 case ET_GESTURE_TAP_DOWN:
120 case ET_GESTURE_BEGIN: 118 case ET_GESTURE_BEGIN:
121 case ET_GESTURE_END: 119 case ET_GESTURE_END:
122 case ET_GESTURE_DOUBLE_TAP: 120 case ET_GESTURE_DOUBLE_TAP:
123 case ET_GESTURE_TWO_FINGER_TAP: 121 case ET_GESTURE_TWO_FINGER_TAP:
124 case ET_GESTURE_PINCH_BEGIN: 122 case ET_GESTURE_PINCH_BEGIN:
125 case ET_GESTURE_PINCH_END: 123 case ET_GESTURE_PINCH_END:
126 case ET_GESTURE_PINCH_UPDATE: 124 case ET_GESTURE_PINCH_UPDATE:
127 case ET_GESTURE_LONG_PRESS: 125 case ET_GESTURE_LONG_PRESS:
128 case ET_GESTURE_LONG_TAP: 126 case ET_GESTURE_LONG_TAP:
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // This value is stored as a bitfield because the number of touch ids varies, 645 // This value is stored as a bitfield because the number of touch ids varies,
648 // but we currently don't need more than 32 touches at a time. 646 // but we currently don't need more than 32 touches at a time.
649 const unsigned int touch_ids_bitfield_; 647 const unsigned int touch_ids_bitfield_;
650 648
651 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 649 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
652 }; 650 };
653 651
654 } // namespace ui 652 } // namespace ui
655 653
656 #endif // UI_BASE_EVENTS_EVENT_H_ 654 #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