OLD | NEW |
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 "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 SyntheticGestureTargetAura::GetDefaultSyntheticGestureSourceType() const { | 131 SyntheticGestureTargetAura::GetDefaultSyntheticGestureSourceType() const { |
132 return SyntheticGestureParams::TOUCH_INPUT; | 132 return SyntheticGestureParams::TOUCH_INPUT; |
133 } | 133 } |
134 | 134 |
135 int SyntheticGestureTargetAura::GetTouchSlopInDips() const { | 135 int SyntheticGestureTargetAura::GetTouchSlopInDips() const { |
136 // - 1 because Aura considers a pointer to be moving if it has moved at least | 136 // - 1 because Aura considers a pointer to be moving if it has moved at least |
137 // 'max_touch_move_in_pixels_for_click' pixels. | 137 // 'max_touch_move_in_pixels_for_click' pixels. |
138 return ui::GestureConfiguration::max_touch_move_in_pixels_for_click() - 1; | 138 return ui::GestureConfiguration::max_touch_move_in_pixels_for_click() - 1; |
139 } | 139 } |
140 | 140 |
| 141 int SyntheticGestureTargetAura::GetMinScalingSpanInDips() const { |
| 142 return ui::GestureConfiguration::min_distance_for_pinch_scroll_in_pixels(); |
| 143 } |
| 144 |
141 aura::Window* SyntheticGestureTargetAura::GetWindow() const { | 145 aura::Window* SyntheticGestureTargetAura::GetWindow() const { |
142 aura::Window* window = render_widget_host()->GetView()->GetNativeView(); | 146 aura::Window* window = render_widget_host()->GetView()->GetNativeView(); |
143 DCHECK(window); | 147 DCHECK(window); |
144 return window; | 148 return window; |
145 } | 149 } |
146 | 150 |
147 } // namespace content | 151 } // namespace content |
OLD | NEW |