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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 551373006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address jdduke's comments. Created 6 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 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" 10 #include "content/browser/frame_host/render_widget_host_view_guest.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // subsequent touch points of that touchdown to the appropriate guest until 134 // subsequent touch points of that touchdown to the appropriate guest until
135 // that touch point is released. 135 // that touch point is released.
136 ScopedVector<ui::TouchEvent> events; 136 ScopedVector<ui::TouchEvent> events;
137 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) 137 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES))
138 return; 138 return;
139 139
140 ui::EventResult result = (ack_result == 140 ui::EventResult result = (ack_result ==
141 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; 141 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED;
142 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), 142 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(),
143 end = events.end(); iter != end; ++iter) { 143 end = events.end(); iter != end; ++iter) {
144 if (!gesture_recognizer_->ProcessTouchEventPreDispatch(*(*iter), this)) 144 if (!gesture_recognizer_->ProcessTouchEvent(*(*iter), this))
145 continue; 145 continue;
146 146
147 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; 147 scoped_ptr<ui::GestureRecognizer::Gestures> gestures;
148 gestures.reset(gesture_recognizer_->ProcessTouchEventPostDispatch( 148 gestures.reset(
149 *(*iter), result, this)); 149 gesture_recognizer_->ProcessTouchEventAck(*(*iter), result, this));
150 ProcessGestures(gestures.get()); 150 ProcessGestures(gestures.get());
151 } 151 }
152 } 152 }
153 #endif 153 #endif
154 154
155 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const { 155 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const {
156 if (!guest_) 156 if (!guest_)
157 return gfx::Rect(); 157 return gfx::Rect();
158 158
159 RenderWidgetHostViewBase* rwhv = GetGuestRenderWidgetHostView(); 159 RenderWidgetHostViewBase* rwhv = GetGuestRenderWidgetHostView();
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 597
598 if (blink::WebInputEvent::isGestureEventType(event->type)) { 598 if (blink::WebInputEvent::isGestureEventType(event->type)) {
599 host_->ForwardGestureEvent( 599 host_->ForwardGestureEvent(
600 *static_cast<const blink::WebGestureEvent*>(event)); 600 *static_cast<const blink::WebGestureEvent*>(event));
601 return; 601 return;
602 } 602 }
603 } 603 }
604 604
605 } // namespace content 605 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | ui/aura/window_event_dispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698