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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 213123011: Make DeviceDisplayInfo a Singleton and have ScreenOrientationListener update it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 93e74bca72eae77901608c0374a964572c223d0e..a6251b81dadae71c33a04dd053e8784dd4a1a72e 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -539,7 +539,7 @@ public class ContentViewCore
View view, float x, float y, float width, float height) {
assert view.getParent() == mContainerView;
- float scale = (float) DeviceDisplayInfo.create(getContext()).getDIPScale();
+ float scale = (float) DeviceDisplayInfo.getInstance(getContext()).getDIPScale();
// The anchor view should not go outside the bounds of the ContainerView.
int leftMargin = Math.round(x * scale);

Powered by Google App Engine
This is Rietveld 408576698