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

Side by Side Diff: content/browser/renderer_host/input/content_gesture_provider.cc

Issue 178193022: [Android] Always insert a TouchCancel if window or tab focus is lost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 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 "content/browser/renderer_host/input/content_gesture_provider.h" 5 #include "content/browser/renderer_host/input/content_gesture_provider.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void ContentGestureProvider::SetDoubleTapSupportForPlatformEnabled( 192 void ContentGestureProvider::SetDoubleTapSupportForPlatformEnabled(
193 bool enabled) { 193 bool enabled) {
194 gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled); 194 gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled);
195 } 195 }
196 196
197 void ContentGestureProvider::SetDoubleTapSupportForPageEnabled(bool enabled) { 197 void ContentGestureProvider::SetDoubleTapSupportForPageEnabled(bool enabled) {
198 gesture_provider_.SetDoubleTapSupportForPageEnabled(enabled); 198 gesture_provider_.SetDoubleTapSupportForPageEnabled(enabled);
199 } 199 }
200 200
201 const ui::MotionEvent* ContentGestureProvider::GetCurrentDownEvent() const {
202 return gesture_provider_.current_down_event();
203 }
204
201 void ContentGestureProvider::OnGestureEvent( 205 void ContentGestureProvider::OnGestureEvent(
202 const ui::GestureEventData& event) { 206 const ui::GestureEventData& event) {
203 if (handling_event_) { 207 if (handling_event_) {
204 pending_gesture_packet_.Push(event); 208 pending_gesture_packet_.Push(event);
205 return; 209 return;
206 } 210 }
207 211
208 gesture_filter_.OnGesturePacket( 212 gesture_filter_.OnGesturePacket(
209 ui::GestureEventDataPacket::FromTouchTimeout(event)); 213 ui::GestureEventDataPacket::FromTouchTimeout(event));
210 } 214 }
211 215
212 void ContentGestureProvider::ForwardGestureEvent( 216 void ContentGestureProvider::ForwardGestureEvent(
213 const ui::GestureEventData& event) { 217 const ui::GestureEventData& event) {
214 client_->OnGestureEvent(CreateGesture(event, touch_to_gesture_scale_)); 218 client_->OnGestureEvent(CreateGesture(event, touch_to_gesture_scale_));
215 } 219 }
216 220
217 } // namespace content 221 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698