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

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

Issue 2412613002: Support native app redirects to herb. (Closed)
Patch Set: Created 4 years, 2 months 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 c7d69241e524c2b9c2d308a77542c29e07f3f344..49875c2aacfcb87229b1d106cfaa906d0deb06b9 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);
}
}
@@ -276,10 +278,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()
@@ -457,9 +461,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