| 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 df730b8941fbd5b720f0f4db092a456044eb184a..5a8bb10b3899520464b7cad55bb7272afe0dcd8a 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
|
| @@ -2612,7 +2612,26 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| */
|
| public void updateTopControlsState(boolean enableHiding, boolean enableShowing,
|
| boolean animate) {
|
| - nativeUpdateTopControlsState(mNativeContentViewCore, enableHiding, enableShowing, animate);
|
| + // TODO(mvanouwerkerk): Stop calling this method from Chrome on Android, then delete it.
|
| + int constraints = TopControlsState.BOTH;
|
| + if (!enableShowing) {
|
| + constraints = TopControlsState.HIDDEN;
|
| + }
|
| + if (!enableHiding) {
|
| + constraints = TopControlsState.SHOWN;
|
| + }
|
| + updateTopControlsState(constraints, TopControlsState.BOTH, animate);
|
| + }
|
| +
|
| + /**
|
| + * Changes whether hiding the top controls is enabled.
|
| + *
|
| + * @param constraints The visibility states that are allowed for the top controls.
|
| + * @param current The visibility state of the top controls that should be current.
|
| + * @param animate Whether a state transition should be animated or not.
|
| + */
|
| + public void updateTopControlsState(int constraints, int current, boolean animate) {
|
| + nativeUpdateTopControlsState(mNativeContentViewCore, constraints, current, animate);
|
| }
|
|
|
| /**
|
| @@ -2891,7 +2910,7 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
|
|
| private native void nativeExitFullscreen(int nativeContentViewCoreImpl);
|
| private native void nativeUpdateTopControlsState(int nativeContentViewCoreImpl,
|
| - boolean enableHiding, boolean enableShowing, boolean animate);
|
| + int constraints, int current, boolean animate);
|
|
|
| private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl);
|
|
|
|
|