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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_android.cc

Issue 1216933013: [Android] Expose native ViewConfiguration constants as DIPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment and add assert Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/synthetic_gesture_target_android.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
index 836da7db49eba745a8ca5621bae54bc6b1fb4236..501da40d75f10e0e212c7272e67d5acd42af32e0 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
@@ -107,16 +107,11 @@ SyntheticGestureTargetAndroid::GetDefaultSyntheticGestureSourceType() const {
}
float SyntheticGestureTargetAndroid::GetTouchSlopInDips() const {
- float device_scale_factor =
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().device_scale_factor();
- return gfx::ViewConfiguration::GetTouchSlopInPixels() / device_scale_factor;
+ return gfx::ViewConfiguration::GetTouchSlopInDips();
}
float SyntheticGestureTargetAndroid::GetMinScalingSpanInDips() const {
- float device_scale_factor =
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().device_scale_factor();
- return
- gfx::ViewConfiguration::GetMinScalingSpanInPixels() / device_scale_factor;
+ return gfx::ViewConfiguration::GetMinScalingSpanInDips();
}
} // namespace content
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698