| Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
| index 620dc1e62b84ddab566cb701de95a96859d3747c..c16b95e6a4d58ca03b28af961790fd337b75d5d8 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
| @@ -20,6 +20,7 @@ import android.os.IBinder;
|
| import android.support.customtabs.CustomTabsIntent;
|
| import android.text.TextUtils;
|
| import android.util.Pair;
|
| +import android.widget.RemoteViews;
|
|
|
| import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.base.Log;
|
| @@ -76,6 +77,7 @@ public class CustomTabIntentDataProvider {
|
| private boolean mShowShareItem;
|
| private CustomButtonParams mToolbarButton;
|
| private List<CustomButtonParams> mBottombarButtons = new ArrayList<>(2);
|
| + private RemoteViews mRemoteViews;
|
| // OnFinished listener for PendingIntents. Used for testing only.
|
| private PendingIntent.OnFinished mOnFinished;
|
|
|
| @@ -133,6 +135,8 @@ public class CustomTabIntentDataProvider {
|
| CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, CustomTabsIntent.NO_TITLE);
|
| mShowShareItem = IntentUtils.safeGetBooleanExtra(intent,
|
| CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM, false);
|
| + mRemoteViews = IntentUtils.safeGetParcelableExtra(intent,
|
| + CustomTabsIntent.EXTRA_SECONDARY_TOOLBAR_REMOTEVIEWS);
|
| }
|
|
|
| /**
|
| @@ -255,7 +259,7 @@ public class CustomTabIntentDataProvider {
|
| * @return Whether the bottom bar should be shown.
|
| */
|
| public boolean shouldShowBottomBar() {
|
| - return !mBottombarButtons.isEmpty();
|
| + return !mBottombarButtons.isEmpty() || mRemoteViews != null;
|
| }
|
|
|
| /**
|
| @@ -266,6 +270,14 @@ public class CustomTabIntentDataProvider {
|
| }
|
|
|
| /**
|
| + * @return The {@link RemoteViews} to show on the bottom bar, or null if the extra is not
|
| + * specified.
|
| + */
|
| + public RemoteViews getBottomBarRemoteViews() {
|
| + return mRemoteViews;
|
| + }
|
| +
|
| + /**
|
| * Gets params for all custom buttons, which is the combination of
|
| * {@link #getCustomButtonsOnBottombar()} and {@link #getCustomButtonOnToolbar()}.
|
| */
|
|
|