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 9c2105f3bd45379ce2bc120de6f6bc7a2b4b6be5..41ce2239712799c4120f87acbe4e1df3cb53e494 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() { |