Chromium Code Reviews| 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()); |
| } |
| } |