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

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

Issue 10826209: gestures: Generate only either scroll-end or fling-start events at the end of a scroll gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove-webkit-hack Created 8 years, 4 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/base/gestures/gesture_sequence.cc ('k') | ui/views/widget/root_view.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 1
2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #ifndef UI_VIEWS_EVENTS_EVENT_H_ 6 #ifndef UI_VIEWS_EVENTS_EVENT_H_
7 #define UI_VIEWS_EVENTS_EVENT_H_ 7 #define UI_VIEWS_EVENTS_EVENT_H_
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 type_ == ui::ET_TOUCH_STATIONARY || 84 type_ == ui::ET_TOUCH_STATIONARY ||
85 type_ == ui::ET_TOUCH_CANCELLED; 85 type_ == ui::ET_TOUCH_CANCELLED;
86 } 86 }
87 87
88 bool IsScrollGestureEvent() const { 88 bool IsScrollGestureEvent() const {
89 return type_ == ui::ET_GESTURE_SCROLL_BEGIN || 89 return type_ == ui::ET_GESTURE_SCROLL_BEGIN ||
90 type_ == ui::ET_GESTURE_SCROLL_UPDATE || 90 type_ == ui::ET_GESTURE_SCROLL_UPDATE ||
91 type_ == ui::ET_GESTURE_SCROLL_END; 91 type_ == ui::ET_GESTURE_SCROLL_END;
92 } 92 }
93 93
94 bool IsFlingScrollEvent() const {
95 return type_ == ui::ET_SCROLL_FLING_CANCEL ||
96 type_ == ui::ET_SCROLL_FLING_START;
97 }
98
94 protected: 99 protected:
95 Event(ui::EventType type, int flags); 100 Event(ui::EventType type, int flags);
96 Event(const NativeEvent& native_event, ui::EventType type, int flags); 101 Event(const NativeEvent& native_event, ui::EventType type, int flags);
97 Event(const Event& model) 102 Event(const Event& model)
98 : native_event_(model.native_event()), 103 : native_event_(model.native_event()),
99 type_(model.type()), 104 type_(model.type()),
100 time_stamp_(model.time_stamp()), 105 time_stamp_(model.time_stamp()),
101 flags_(model.flags()) { 106 flags_(model.flags()) {
102 } 107 }
103 108
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); 459 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest);
455 }; 460 };
456 461
457 #if defined(OS_WIN) 462 #if defined(OS_WIN)
458 int GetModifiersFromKeyState(); 463 int GetModifiersFromKeyState();
459 #endif 464 #endif
460 465
461 } // namespace views 466 } // namespace views
462 467
463 #endif // UI_VIEWS_EVENTS_EVENT_H_ 468 #endif // UI_VIEWS_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/base/gestures/gesture_sequence.cc ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698