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 2e2b36a3a1993e81547e68b4ea6cc87c07cf2ac1..f4d0da000814213bb79a3b0de46da64ace2a5b26 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 |
@@ -1029,6 +1029,14 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
} |
/** |
+ * @return Viewport height when the OSK is hidden in physical pixels as set from onSizeChanged. |
+ */ |
+ @CalledByNative |
+ public int getViewportHeightWithOSKHiddenPix() { |
+ return mViewportHeightPix + getContentViewClient().getSystemWindowInsetBottom(); |
+ } |
+ |
+ /** |
* @return Width of underlying physical surface. |
*/ |
@CalledByNative |
@@ -1058,6 +1066,22 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
} |
/** |
+ * @return Current device scale factor (maps DIP pixels to physical pixels). |
+ */ |
+ @VisibleForTesting |
+ public float getDeviceScaleFactor() { |
+ return mRenderCoordinates.getDeviceScaleFactor(); |
+ } |
+ |
+ /** |
+ * @return Current page scale factor (maps CSS pixels to DIP pixels). |
+ */ |
+ @VisibleForTesting |
+ public float getPageScaleFactor() { |
+ return mRenderCoordinates.getPageScaleFactor(); |
+ } |
+ |
+ /** |
* @see android.webkit.WebView#getContentHeight() |
*/ |
public float getContentHeightCss() { |