| 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 6d4807151870a877bedb575ad17594476883b98d..78232fadca835332a2681f6939a556bc620979a8 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
|
| @@ -828,6 +828,11 @@
|
| return mContentViewClient;
|
| }
|
|
|
| + @CalledByNative
|
| + private void onBackgroundColorChanged(int color) {
|
| + getContentViewClient().onBackgroundColorChanged(color);
|
| + }
|
| +
|
| /**
|
| * @return Viewport width in physical pixels as set from onSizeChanged.
|
| */
|
| @@ -1799,6 +1804,7 @@
|
| float minPageScaleFactor, float maxPageScaleFactor, float contentWidth,
|
| float contentHeight, float viewportWidth, float viewportHeight,
|
| float browserControlsHeightDp, float browserControlsShownRatio,
|
| + float bottomControlsHeightDp, float bottomControlsShownRatio,
|
| boolean isMobileOptimizedHint, boolean hasInsertionMarker,
|
| boolean isInsertionMarkerVisible, float insertionMarkerHorizontal,
|
| float insertionMarkerTop, float insertionMarkerBottom) {
|
| @@ -1813,6 +1819,8 @@
|
| mViewportHeightPix / (deviceScale * pageScaleFactor));
|
| final float topBarShownPix =
|
| browserControlsHeightDp * deviceScale * browserControlsShownRatio;
|
| + final float bottomBarShownPix = bottomControlsHeightDp * deviceScale
|
| + * bottomControlsShownRatio;
|
|
|
| final boolean contentSizeChanged =
|
| contentWidth != mRenderCoordinates.getContentWidthCss()
|
| @@ -1828,6 +1836,8 @@
|
| || scrollOffsetY != mRenderCoordinates.getScrollY();
|
| final boolean topBarChanged = Float.compare(topBarShownPix,
|
| mRenderCoordinates.getContentOffsetYPix()) != 0;
|
| + final boolean bottomBarChanged = Float.compare(bottomBarShownPix, mRenderCoordinates
|
| + .getContentOffsetYPixBottom()) != 0;
|
|
|
| final boolean needHidePopupZoomer = contentSizeChanged || scrollChanged;
|
|
|
| @@ -1846,7 +1856,7 @@
|
| contentWidth, contentHeight,
|
| viewportWidth, viewportHeight,
|
| pageScaleFactor, minPageScaleFactor, maxPageScaleFactor,
|
| - topBarShownPix);
|
| + topBarShownPix, bottomBarShownPix);
|
|
|
| if (scrollChanged || topBarChanged) {
|
| for (mGestureStateListenersIterator.rewind();
|
| @@ -1863,6 +1873,15 @@
|
| mGestureStateListenersIterator.next().onScaleLimitsChanged(
|
| minPageScaleFactor, maxPageScaleFactor);
|
| }
|
| + }
|
| +
|
| + if (topBarChanged) {
|
| + float topBarTranslate = topBarShownPix - browserControlsHeightDp * deviceScale;
|
| + getContentViewClient().onTopControlsChanged(topBarTranslate, topBarShownPix);
|
| + }
|
| + if (bottomBarChanged) {
|
| + float bottomBarTranslate = bottomControlsHeightDp * deviceScale - bottomBarShownPix;
|
| + getContentViewClient().onBottomControlsChanged(bottomBarTranslate, bottomBarShownPix);
|
| }
|
|
|
| if (mBrowserAccessibilityManager != null) {
|
| @@ -2284,6 +2303,11 @@
|
| return mRenderCoordinates.getPageScaleFactor();
|
| }
|
|
|
| + @CalledByNative
|
| + private void startContentIntent(String contentUrl, boolean isMainFrame) {
|
| + getContentViewClient().onStartContentIntent(getContext(), contentUrl, isMainFrame);
|
| + }
|
| +
|
| @Override
|
| public void onAccessibilityStateChanged(boolean enabled) {
|
| setAccessibilityState(enabled);
|
|
|