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

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

Issue 16950030: Handle alternate types in HandleMouseEvent. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add support for MouseWheelEvent Created 7 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_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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return type_ == ET_GESTURE_SCROLL_BEGIN || 167 return type_ == ET_GESTURE_SCROLL_BEGIN ||
168 type_ == ET_GESTURE_SCROLL_UPDATE || 168 type_ == ET_GESTURE_SCROLL_UPDATE ||
169 type_ == ET_GESTURE_SCROLL_END; 169 type_ == ET_GESTURE_SCROLL_END;
170 } 170 }
171 171
172 bool IsFlingScrollEvent() const { 172 bool IsFlingScrollEvent() const {
173 return type_ == ET_SCROLL_FLING_CANCEL || 173 return type_ == ET_SCROLL_FLING_CANCEL ||
174 type_ == ET_SCROLL_FLING_START; 174 type_ == ET_SCROLL_FLING_START;
175 } 175 }
176 176
177 bool IsMouseWheelEvent() const {
178 return type_ == ET_MOUSEWHEEL;
sadrul 2013/06/24 02:09:35 This is simple enough that I wouldn't add it.
179 }
180
177 // Returns true if the event has a valid |native_event_|. 181 // Returns true if the event has a valid |native_event_|.
178 bool HasNativeEvent() const; 182 bool HasNativeEvent() const;
179 183
180 // Immediately stops the propagation of the event. This must be called only 184 // Immediately stops the propagation of the event. This must be called only
181 // from an EventHandler during an event-dispatch. Any event handler that may 185 // from an EventHandler during an event-dispatch. Any event handler that may
182 // be in the list will not receive the event after this is called. 186 // be in the list will not receive the event after this is called.
183 // Note that StopPropagation() can be called only for cancelable events. 187 // Note that StopPropagation() can be called only for cancelable events.
184 void StopPropagation(); 188 void StopPropagation();
185 bool stopped_propagation() const { return !!(result_ & ER_CONSUMED); } 189 bool stopped_propagation() const { return !!(result_ & ER_CONSUMED); }
186 190
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // This value is stored as a bitfield because the number of touch ids varies, 707 // This value is stored as a bitfield because the number of touch ids varies,
704 // but we currently don't need more than 32 touches at a time. 708 // but we currently don't need more than 32 touches at a time.
705 const unsigned int touch_ids_bitfield_; 709 const unsigned int touch_ids_bitfield_;
706 710
707 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 711 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
708 }; 712 };
709 713
710 } // namespace ui 714 } // namespace ui
711 715
712 #endif // UI_BASE_EVENTS_EVENT_H_ 716 #endif // UI_BASE_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_win.cc » ('j') | ui/views/widget/native_widget_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698