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

Unified Diff: ui/aura/root_window.cc

Issue 11188012: gesture recognizer: Remove the touch-event queue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/base/events/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 9cf2a7d8105e764ebf52bafd78b2a86fdd3ed04e..8e1cef986634b8eb7d67d2afd2ce11550ab70cef 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -393,9 +393,12 @@ void RootWindow::ConvertPointFromNativeScreen(gfx::Point* point) const {
point->Scale(1 / ui::GetDeviceScaleFactor(layer())));
}
-void RootWindow::AdvanceQueuedTouchEvent(Window* window, bool processed) {
+void RootWindow::ProcessedTouchEvent(ui::TouchEvent* event,
+ Window* window,
+ ui::EventResult result) {
scoped_ptr<ui::GestureRecognizer::Gestures> gestures;
- gestures.reset(gesture_recognizer_->AdvanceTouchQueue(window, processed));
+ gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture(
+ *event, result, window));
ProcessGestures(gestures.get());
}
@@ -756,7 +759,7 @@ void RootWindow::OnWindowHidden(Window* invisible, bool destroyed) {
}
void RootWindow::CleanupGestureRecognizerState(Window* window) {
- gesture_recognizer_->FlushTouchQueue(window);
+ gesture_recognizer_->CleanupStateForConsumer(window);
Windows windows = window->children();
for (Windows::const_iterator iter = windows.begin();
iter != windows.end();
@@ -911,11 +914,6 @@ bool RootWindow::OnHostTouchEvent(ui::TouchEvent* event) {
*event, static_cast<Window*>(this), target);
result = ProcessTouchEvent(target, &translated_event);
handled = result != ui::ER_UNHANDLED;
-
- if (result & ui::ER_ASYNC) {
- gesture_recognizer_->QueueTouchEventForGesture(target, *event);
- return true;
- }
}
// Get the list of GestureEvents from GestureRecognizer.
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/base/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698