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

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

Issue 95153002: Make touch-based synthetic gesture take touch slop into account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused variable. Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/synthetic_gesture_target_aura.h" 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_aura.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 8 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
9 #include "content/browser/renderer_host/ui_events_helper.h" 9 #include "content/browser/renderer_host/ui_events_helper.h"
10 #include "content/common/input/input_event.h" 10 #include "content/common/input/input_event.h"
11 #include "ui/aura/client/screen_position_client.h" 11 #include "ui/aura/client/screen_position_client.h"
12 #include "ui/aura/root_window.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
14 #include "ui/events/gestures/gesture_configuration.h"
14 15
15 using blink::WebTouchEvent; 16 using blink::WebTouchEvent;
16 using blink::WebMouseWheelEvent; 17 using blink::WebMouseWheelEvent;
17 18
18 namespace content { 19 namespace content {
19 20
20 SyntheticGestureTargetAura::SyntheticGestureTargetAura( 21 SyntheticGestureTargetAura::SyntheticGestureTargetAura(
21 RenderWidgetHostImpl* host) 22 RenderWidgetHostImpl* host)
22 : SyntheticGestureTargetBase(host) { 23 : SyntheticGestureTargetBase(host) {
23 } 24 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // DispatchWebMouseWheelEventToPlatform is ready. 64 // DispatchWebMouseWheelEventToPlatform is ready.
64 return SyntheticGestureParams::TOUCH_INPUT; 65 return SyntheticGestureParams::TOUCH_INPUT;
65 } 66 }
66 67
67 bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType( 68 bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType(
68 SyntheticGestureParams::GestureSourceType gesture_source_type) const { 69 SyntheticGestureParams::GestureSourceType gesture_source_type) const {
69 return gesture_source_type == SyntheticGestureParams::TOUCH_INPUT || 70 return gesture_source_type == SyntheticGestureParams::TOUCH_INPUT ||
70 gesture_source_type == SyntheticGestureParams::MOUSE_INPUT; 71 gesture_source_type == SyntheticGestureParams::MOUSE_INPUT;
71 } 72 }
72 73
74 int SyntheticGestureTargetAura::GetTouchSlopInDips() const {
75 // - 1 because Aura considers a pointer to be moving if it has moved at least
76 // 'max_touch_move_in_pixels_for_click' pixels.
77 return ui::GestureConfiguration::max_touch_move_in_pixels_for_click() - 1;
78 }
79
73 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698