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_android.h
" | 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" |
6 | 6 |
7 #include "content/browser/android/content_view_core_impl.h" | 7 #include "content/browser/android/content_view_core_impl.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "jni/MotionEventSynthesizer_jni.h" | 9 #include "jni/MotionEventSynthesizer_jni.h" |
10 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const blink::WebMouseEvent& web_mouse, const ui::LatencyInfo&) { | 100 const blink::WebMouseEvent& web_mouse, const ui::LatencyInfo&) { |
101 CHECK(false); | 101 CHECK(false); |
102 } | 102 } |
103 | 103 |
104 SyntheticGestureParams::GestureSourceType | 104 SyntheticGestureParams::GestureSourceType |
105 SyntheticGestureTargetAndroid::GetDefaultSyntheticGestureSourceType() const { | 105 SyntheticGestureTargetAndroid::GetDefaultSyntheticGestureSourceType() const { |
106 return SyntheticGestureParams::TOUCH_INPUT; | 106 return SyntheticGestureParams::TOUCH_INPUT; |
107 } | 107 } |
108 | 108 |
109 float SyntheticGestureTargetAndroid::GetTouchSlopInDips() const { | 109 float SyntheticGestureTargetAndroid::GetTouchSlopInDips() const { |
110 float device_scale_factor = | 110 return gfx::ViewConfiguration::GetTouchSlopInDips(); |
111 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().device_scale_factor(); | |
112 return gfx::ViewConfiguration::GetTouchSlopInPixels() / device_scale_factor; | |
113 } | 111 } |
114 | 112 |
115 float SyntheticGestureTargetAndroid::GetMinScalingSpanInDips() const { | 113 float SyntheticGestureTargetAndroid::GetMinScalingSpanInDips() const { |
116 float device_scale_factor = | 114 return gfx::ViewConfiguration::GetMinScalingSpanInDips(); |
117 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().device_scale_factor(); | |
118 return | |
119 gfx::ViewConfiguration::GetMinScalingSpanInPixels() / device_scale_factor; | |
120 } | 115 } |
121 | 116 |
122 } // namespace content | 117 } // namespace content |
OLD | NEW |