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 067c3b0ae9ae36113a00bf0327497c8aa00e1b45..2dd0ec14d4c9a1d205cf0d60941ef4542523b3dc 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 |
@@ -59,6 +59,23 @@ public class CustomTabIntentDataProvider { |
"android.support.CUSTOM_TABS:toolbar_color"; |
/** |
+ * Extra int that specifies state for showing the page title. Default is showing only the domain |
+ * and no information about the title. |
+ */ |
+ public static final String EXTRA_CUSTOM_TABS_TITLE_VISIBILITY_STATE = |
+ "android.support.CUSTOM_TABS:title_visibility"; |
+ |
+ /** |
+ * Don't show any title. Shows only the domain. |
+ */ |
+ public static final int CUSTOM_TAB_NO_TITLE = 0; |
+ |
+ /** |
+ * Shows the page title and the domain. |
+ */ |
+ public static final int CUSTOM_TAB_SHOW_PAGE_TITLE = 1; |
+ |
+ /** |
* Bundle used for the action button parameters. |
*/ |
public static final String EXTRA_CUSTOM_TABS_ACTION_BUTTON_BUNDLE = |
@@ -108,6 +125,7 @@ public class CustomTabIntentDataProvider { |
private static final String BUNDLE_EXIT_ANIMATION_RESOURCE = "android:animExitRes"; |
private final long mSessionId; |
private final Intent mKeepAliveServiceIntent; |
+ private final int mTitleVisibilityState; |
private int mToolbarColor; |
private Bitmap mIcon; |
private PendingIntent mActionButtonPendingIntent; |
@@ -156,6 +174,9 @@ public class CustomTabIntentDataProvider { |
mAnimationBundle = IntentUtils.safeGetBundleExtra( |
intent, EXTRA_CUSTOM_TABS_EXIT_ANIMATION_BUNDLE); |
+ |
+ mTitleVisibilityState = IntentUtils.safeGetIntExtra( |
+ intent, EXTRA_CUSTOM_TABS_TITLE_VISIBILITY_STATE, CUSTOM_TAB_NO_TITLE); |
} |
/** |
@@ -198,6 +219,14 @@ public class CustomTabIntentDataProvider { |
} |
/** |
+ * @return The title visibility state for the toolbar. |
+ * Default is {@link CustomTabIntentDataProvider#CUSTOM_TAB_NO_TITLE}. |
+ */ |
+ public int getTitleVisibilityState() { |
+ return mTitleVisibilityState; |
+ } |
+ |
+ /** |
* @return Whether the client app has provided sufficient info for the toolbar to show the |
* action button. |
*/ |