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

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 sadrul's comments. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 594 }
595 595
596 if (blink::WebInputEvent::isGestureEventType(event->type)) { 596 if (blink::WebInputEvent::isGestureEventType(event->type)) {
597 host_->ForwardGestureEvent( 597 host_->ForwardGestureEvent(
598 *static_cast<const blink::WebGestureEvent*>(event)); 598 *static_cast<const blink::WebGestureEvent*>(event));
599 return; 599 return;
600 } 600 }
601 } 601 }
602 602
603 } // namespace content 603 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698