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

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

Issue 2411903003: Fix tab redirect to apps in Herb mode. (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 25a7d7e3f3b6ea8941d8ccc59a791a2899caab06..f0187a89443fd1a88073fdd72eed249cfbdd9ff1 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
@@ -133,17 +133,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);
}
}
@@ -293,10 +295,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()
@@ -477,9 +481,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