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

Side by Side Diff: ui/aura/window_event_dispatcher.cc

Issue 503883004: Don't pass touches to gesture recognizer for async acks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac build. Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/aura/window_event_dispatcher.h" 5 #include "ui/aura/window_event_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 } 151 }
152 152
153 DispatchDetails WindowEventDispatcher::DispatchMouseExitAtPoint( 153 DispatchDetails WindowEventDispatcher::DispatchMouseExitAtPoint(
154 const gfx::Point& point) { 154 const gfx::Point& point) {
155 ui::MouseEvent event(ui::ET_MOUSE_EXITED, point, point, ui::EF_NONE, 155 ui::MouseEvent event(ui::ET_MOUSE_EXITED, point, point, ui::EF_NONE,
156 ui::EF_NONE); 156 ui::EF_NONE);
157 return DispatchMouseEnterOrExit(event, ui::ET_MOUSE_EXITED); 157 return DispatchMouseEnterOrExit(event, ui::ET_MOUSE_EXITED);
158 } 158 }
159 159
160 void WindowEventDispatcher::ProcessedTouchEvent(ui::TouchEvent* event, 160 void WindowEventDispatcher::ProcessedTouchEvent(Window* window,
161 Window* window,
162 ui::EventResult result) { 161 ui::EventResult result) {
163 ui::TouchEvent orig_event(*event, window, this->window());
164 // Once we've fully migrated to the eager gesture detector, we won't need to
165 // pass an event here.
166 scoped_ptr<ui::GestureRecognizer::Gestures> gestures( 162 scoped_ptr<ui::GestureRecognizer::Gestures> gestures(
167 ui::GestureRecognizer::Get()->ProcessTouchEventOnAsyncAck( 163 ui::GestureRecognizer::Get()->ProcessTouchEventOnAsyncAck(result,
168 orig_event, result, window)); 164 window));
169 DispatchDetails details = ProcessGestures(gestures.get()); 165 DispatchDetails details = ProcessGestures(gestures.get());
170 if (details.dispatcher_destroyed) 166 if (details.dispatcher_destroyed)
171 return; 167 return;
172 } 168 }
173 169
174 void WindowEventDispatcher::HoldPointerMoves() { 170 void WindowEventDispatcher::HoldPointerMoves() {
175 if (!move_hold_count_) 171 if (!move_hold_count_)
176 held_event_factory_.InvalidateWeakPtrs(); 172 held_event_factory_.InvalidateWeakPtrs();
177 ++move_hold_count_; 173 ++move_hold_count_;
178 TRACE_EVENT_ASYNC_BEGIN0("ui", "WindowEventDispatcher::HoldPointerMoves", 174 TRACE_EVENT_ASYNC_BEGIN0("ui", "WindowEventDispatcher::HoldPointerMoves",
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(orig_event, 894 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(orig_event,
899 target)) { 895 target)) {
900 event->StopPropagation(); 896 event->StopPropagation();
901 } 897 }
902 } 898 }
903 899
904 PreDispatchLocatedEvent(target, event); 900 PreDispatchLocatedEvent(target, event);
905 } 901 }
906 902
907 } // namespace aura 903 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698