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

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

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: comments Created 3 years, 10 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
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 cdbb845f42b526104106f6f94cabb6e772ebb199..6a6efc333d2374eb18b30574e025d7697cf26493 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
@@ -79,7 +79,7 @@ import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.common.Referrer;
import org.chromium.ui.base.PageTransition;
-import org.chromium.ui.base.WindowAndroid;
+import org.chromium.ui.base.ViewRoot;
/**
* The activity for custom tabs. It will be launched on top of a client's task.
@@ -150,10 +150,9 @@ public class CustomTabActivity extends ChromeActivity {
private final boolean mIsOpenedByChrome;
private final BrowserStateBrowserControlsVisibilityDelegate mVisibilityDelegate;
- public CustomTabCreator(
- ChromeActivity activity, WindowAndroid nativeWindow, boolean incognito,
+ public CustomTabCreator(ChromeActivity activity, ViewRoot viewRoot, boolean incognito,
boolean supportsUrlBarHiding, boolean isOpenedByChrome) {
- super(activity, nativeWindow, incognito);
+ super(activity, viewRoot, incognito);
mSupportsUrlBarHiding = supportsUrlBarHiding;
mIsOpenedByChrome = isOpenedByChrome;
mVisibilityDelegate = activity.getFullscreenManager().getBrowserVisibilityDelegate();
@@ -368,13 +367,10 @@ public class CustomTabActivity extends ChromeActivity {
@Override
protected Pair<CustomTabCreator, CustomTabCreator> createTabCreators() {
- return Pair.create(
- new CustomTabCreator(
- this, getWindowAndroid(), false,
- mIntentDataProvider.shouldEnableUrlBarHiding(),
- mIntentDataProvider.isOpenedByChrome()),
- new CustomTabCreator(
- this, getWindowAndroid(), true,
+ return Pair.create(new CustomTabCreator(this, getViewRoot(), false,
+ mIntentDataProvider.shouldEnableUrlBarHiding(),
+ mIntentDataProvider.isOpenedByChrome()),
+ new CustomTabCreator(this, getViewRoot(), true,
mIntentDataProvider.shouldEnableUrlBarHiding(),
mIntentDataProvider.isOpenedByChrome()));
}
@@ -513,8 +509,8 @@ public class CustomTabActivity extends ChromeActivity {
if (referrer != null) referrerUrl = referrer.getUrl();
}
Tab tab = new Tab(TabIdManager.getInstance().generateValidId(Tab.INVALID_TAB_ID),
- Tab.INVALID_TAB_ID, false, this, getWindowAndroid(),
- TabLaunchType.FROM_EXTERNAL_APP, null, null);
+ Tab.INVALID_TAB_ID, false, this, getViewRoot(), TabLaunchType.FROM_EXTERNAL_APP,
+ null, null);
tab.setAppAssociatedWith(customTabsConnection.getClientPackageNameForSession(mSession));
mPrerenderedUrl = customTabsConnection.getPrerenderedUrl(mSession);

Powered by Google App Engine
This is Rietveld 408576698