Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1852)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2505063003: Support native app redirects to herb. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 549b5d2cf7ef7654a8adb52c20b44e12da9be129..6a8177dfa5ff3acfe933c03f398e62c0cf2d1ccd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -126,17 +126,19 @@ public class CustomTabActivity extends ChromeActivity {
private static class CustomTabCreator extends ChromeTabCreator {
private final boolean mSupportsUrlBarHiding;
+ private final boolean mIsOpenedByChrome;
public CustomTabCreator(
ChromeActivity activity, WindowAndroid nativeWindow, boolean incognito,
- boolean supportsUrlBarHiding) {
+ boolean supportsUrlBarHiding, boolean isOpenedByChrome) {
super(activity, nativeWindow, incognito);
mSupportsUrlBarHiding = supportsUrlBarHiding;
+ mIsOpenedByChrome = isOpenedByChrome;
}
@Override
public TabDelegateFactory createDefaultTabDelegateFactory() {
- return new CustomTabDelegateFactory(mSupportsUrlBarHiding);
+ return new CustomTabDelegateFactory(mSupportsUrlBarHiding, mIsOpenedByChrome);
}
}
@@ -277,10 +279,12 @@ public class CustomTabActivity extends ChromeActivity {
setTabCreators(
new CustomTabCreator(
this, getWindowAndroid(), false,
- mIntentDataProvider.shouldEnableUrlBarHiding()),
+ mIntentDataProvider.shouldEnableUrlBarHiding(),
+ mIntentDataProvider.isOpenedByChrome()),
new CustomTabCreator(
this, getWindowAndroid(), true,
- mIntentDataProvider.shouldEnableUrlBarHiding()));
+ mIntentDataProvider.shouldEnableUrlBarHiding(),
+ mIntentDataProvider.isOpenedByChrome()));
getToolbarManager().setCloseButtonDrawable(mIntentDataProvider.getCloseButtonDrawable());
getToolbarManager().setShowTitle(mIntentDataProvider.getTitleVisibilityState()
@@ -458,9 +462,12 @@ public class CustomTabActivity extends ChromeActivity {
webContents = WarmupManager.getInstance().takeSpareWebContents(false, false);
}
if (webContents == null) webContents = WebContentsFactory.createWebContents(false, false);
- tab.initialize(webContents, getTabContentManager(),
- new CustomTabDelegateFactory(mIntentDataProvider.shouldEnableUrlBarHiding()), false,
- false);
+ tab.initialize(
+ webContents, getTabContentManager(),
+ new CustomTabDelegateFactory(
+ mIntentDataProvider.shouldEnableUrlBarHiding(),
+ mIntentDataProvider.isOpenedByChrome()),
+ false, false);
initializeMainTab(tab);
return tab;
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698