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

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

Issue 268483004: events: Remove stationary touch-event type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/event.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_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 "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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 type_ == ET_MOUSE_ENTERED || 97 type_ == ET_MOUSE_ENTERED ||
98 type_ == ET_MOUSE_EXITED || 98 type_ == ET_MOUSE_EXITED ||
99 type_ == ET_MOUSEWHEEL || 99 type_ == ET_MOUSEWHEEL ||
100 type_ == ET_MOUSE_CAPTURE_CHANGED; 100 type_ == ET_MOUSE_CAPTURE_CHANGED;
101 } 101 }
102 102
103 bool IsTouchEvent() const { 103 bool IsTouchEvent() const {
104 return type_ == ET_TOUCH_RELEASED || 104 return type_ == ET_TOUCH_RELEASED ||
105 type_ == ET_TOUCH_PRESSED || 105 type_ == ET_TOUCH_PRESSED ||
106 type_ == ET_TOUCH_MOVED || 106 type_ == ET_TOUCH_MOVED ||
107 type_ == ET_TOUCH_STATIONARY ||
108 type_ == ET_TOUCH_CANCELLED; 107 type_ == ET_TOUCH_CANCELLED;
109 } 108 }
110 109
111 bool IsGestureEvent() const { 110 bool IsGestureEvent() const {
112 switch (type_) { 111 switch (type_) {
113 case ET_GESTURE_SCROLL_BEGIN: 112 case ET_GESTURE_SCROLL_BEGIN:
114 case ET_GESTURE_SCROLL_END: 113 case ET_GESTURE_SCROLL_END:
115 case ET_GESTURE_SCROLL_UPDATE: 114 case ET_GESTURE_SCROLL_UPDATE:
116 case ET_GESTURE_TAP: 115 case ET_GESTURE_TAP:
117 case ET_GESTURE_TAP_CANCEL: 116 case ET_GESTURE_TAP_CANCEL:
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // The set of indices of ones in the binary representation of 687 // The set of indices of ones in the binary representation of
689 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture. 688 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture.
690 // This value is stored as a bitfield because the number of touch ids varies, 689 // This value is stored as a bitfield because the number of touch ids varies,
691 // but we currently don't need more than 32 touches at a time. 690 // but we currently don't need more than 32 touches at a time.
692 const unsigned int touch_ids_bitfield_; 691 const unsigned int touch_ids_bitfield_;
693 }; 692 };
694 693
695 } // namespace ui 694 } // namespace ui
696 695
697 #endif // UI_EVENTS_EVENT_H_ 696 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698