| Index: ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
| index 82d09ea85aba6095b160d67ec5238c93b1586bb1..05c2dfa955bf6349dd955751b5f34bf4431610d8 100644
|
| --- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
| +++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
| @@ -8,6 +8,7 @@ import android.content.ClipData;
|
| import android.graphics.Bitmap;
|
| import android.os.Build;
|
| import android.view.View;
|
| +import android.view.View.MeasureSpec;
|
| import android.view.ViewGroup;
|
| import android.widget.FrameLayout.LayoutParams;
|
| import android.widget.ImageView;
|
| @@ -25,6 +26,10 @@ public abstract class ViewAndroidDelegate {
|
| // TODO(hush): use View#DRAG_FLAG_GLOBAL when Chromium starts to build with API 24.
|
| private static final int DRAG_FLAG_GLOBAL = 1 << 8;
|
|
|
| + // Default value to signal that the ContentView's size should not be overridden.
|
| + private static final int UNSPECIFIED_MEASURE_SPEC =
|
| + MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
| +
|
| /**
|
| * @return An anchor view that can be used to anchor decoration views like Autofill popup.
|
| */
|
| @@ -105,6 +110,55 @@ public abstract class ViewAndroidDelegate {
|
| }
|
|
|
| /**
|
| + * Returns the bottom system window inset in pixels. The system window inset represents the area
|
| + * of a full-screen window that is partially or fully obscured by the status bar, navigation
|
| + * bar, IME or other system windows.
|
| + * @return The bottom system window inset.
|
| + */
|
| + public int getSystemWindowInsetBottom() {
|
| + return 0;
|
| + }
|
| +
|
| + @CalledByNative
|
| + public void onBackgroundColorChanged(int color) { }
|
| +
|
| + /**
|
| + * Notifies the client of the position of the top controls.
|
| + * @param topControlsOffsetY The Y offset of the top controls in physical pixels.
|
| + * @param topContentOffsetY The Y offset of the content in physical pixels.
|
| + */
|
| + public void onTopControlsChanged(float topControlsOffsetY, float topContentOffsetY) { }
|
| +
|
| + /**
|
| + * Notifies the client of the position of the bottom controls.
|
| + * @param bottomControlsOffsetY The Y offset of the bottom controls in physical pixels.
|
| + * @param bottomContentOffsetY The Y offset of the content in physical pixels.
|
| + */
|
| + public void onBottomControlsChanged(float bottomControlsOffsetY, float bottomContentOffsetY) { }
|
| +
|
| + /**
|
| + * ContentViewClient users can return a custom value to override the width of
|
| + * the ContentView. By default, this method returns MeasureSpec.UNSPECIFIED, which
|
| + * indicates that the value should not be overridden.
|
| + *
|
| + * @return The desired width of the ContentView.
|
| + */
|
| + public int getDesiredWidthMeasureSpec() {
|
| + return UNSPECIFIED_MEASURE_SPEC;
|
| + }
|
| +
|
| + /**
|
| + * ContentViewClient users can return a custom value to override the height of
|
| + * the ContentView. By default, this method returns MeasureSpec.UNSPECIFIED, which
|
| + * indicates that the value should not be overridden.
|
| + *
|
| + * @return The desired height of the ContentView.
|
| + */
|
| + public int getDesiredHeightMeasureSpec() {
|
| + return UNSPECIFIED_MEASURE_SPEC;
|
| + }
|
| +
|
| + /**
|
| * @return container view that the anchor views are added to. May be null.
|
| */
|
| public abstract ViewGroup getContainerView();
|
|
|