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

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

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows. Created 6 years, 1 month 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 #include "ui/events/event.h" 5 #include "ui/events/event.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/keysym.h> 10 #include <X11/keysym.h>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 CHECK(IsGestureEvent()); 161 CHECK(IsGestureEvent());
162 return static_cast<const GestureEvent*>(this); 162 return static_cast<const GestureEvent*>(this);
163 } 163 }
164 164
165 bool Event::HasNativeEvent() const { 165 bool Event::HasNativeEvent() const {
166 base::NativeEvent null_event; 166 base::NativeEvent null_event;
167 std::memset(&null_event, 0, sizeof(null_event)); 167 std::memset(&null_event, 0, sizeof(null_event));
168 return !!std::memcmp(&native_event_, &null_event, sizeof(null_event)); 168 return !!std::memcmp(&native_event_, &null_event, sizeof(null_event));
169 } 169 }
170 170
171 void Event::DisableSynchronousHandling() {
172 result_ = static_cast<EventResult>(result_ | ER_DISABLE_SYNC_HANDLING);
173 }
174
171 void Event::StopPropagation() { 175 void Event::StopPropagation() {
172 // TODO(sad): Re-enable these checks once View uses dispatcher to dispatch 176 // TODO(sad): Re-enable these checks once View uses dispatcher to dispatch
173 // events. 177 // events.
174 // CHECK(phase_ != EP_PREDISPATCH && phase_ != EP_POSTDISPATCH); 178 // CHECK(phase_ != EP_PREDISPATCH && phase_ != EP_POSTDISPATCH);
175 CHECK(cancelable_); 179 CHECK(cancelable_);
176 result_ = static_cast<EventResult>(result_ | ER_CONSUMED); 180 result_ = static_cast<EventResult>(result_ | ER_CONSUMED);
177 } 181 }
178 182
179 void Event::SetHandled() { 183 void Event::SetHandled() {
180 // TODO(sad): Re-enable these checks once View uses dispatcher to dispatch 184 // TODO(sad): Re-enable these checks once View uses dispatcher to dispatch
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 gfx::PointF(x, y), 974 gfx::PointF(x, y),
971 time_stamp, 975 time_stamp,
972 flags | EF_FROM_TOUCH), 976 flags | EF_FROM_TOUCH),
973 details_(details) { 977 details_(details) {
974 } 978 }
975 979
976 GestureEvent::~GestureEvent() { 980 GestureEvent::~GestureEvent() {
977 } 981 }
978 982
979 } // namespace ui 983 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698