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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 393953012: Eager Gesture Recognition on Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index cc27520709725e4de359516176c2f9b6acc0ee0a..d089a533086598701f3f4eb88afdaa65f243c69d 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -19,6 +19,7 @@
#include "content/public/common/content_switches.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
+#include "ui/events/gestures/unified_gesture_detector_enabled.h"
#if defined(OS_MACOSX)
#import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h"
@@ -110,8 +111,17 @@ void RenderWidgetHostViewGuest::ProcessAckedTouchEvent(
for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(),
end = events.end(); iter != end; ++iter) {
scoped_ptr<ui::GestureRecognizer::Gestures> gestures;
- gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture(
- *(*iter), result, this));
+ if (ui::IsUnifiedGestureDetectorEnabled()) {
+ if (!ui::GestureRecognizer::Get()->ProcessTouchEventForGesture(*(*iter),
+ this)) {
+ gestures.reset(ui::GestureRecognizer::Get()->AckTouchEventForGesture(
+ result, this));
+ }
+ } else {
jdduke (slow) 2014/07/30 15:29:32 This branching is unfortunate but I guess it won't
tdresser 2014/07/31 15:33:31 Assuming we can land eager GR in 38, I'm hoping to
+ gestures.reset(
+ gesture_recognizer_->ProcessTouchEventForGestureForOldAuraGR(
+ *(*iter), result, this));
+ }
ProcessGestures(gestures.get());
}
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.h » ('j') | ui/aura/window_event_dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698