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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java

Issue 1731673002: Add tab reparenting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/tabmodel/ChromeTabCreator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
index da056d4650efb6427badcb11cbfb3048ce45f310..406ce8f79b15493e8665ec326326c8cd9516951e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
@@ -111,13 +111,15 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
AsyncTabParams asyncParams =
AsyncTabParamsManager.remove(assignedTabId);
WebContents webContents = asyncParams == null ? null : asyncParams.getWebContents();
-
boolean openInForeground = mOrderController.willOpenInForeground(type, mIncognito)
|| webContents != null;
TabDelegateFactory delegateFactory = parent == null ? new TabDelegateFactory()
: parent.getDelegateFactory();
- Tab tab;
- if (webContents != null) {
+ Tab tab = asyncParams != null ? asyncParams.getTabToReparent() : null;
+ if (tab != null) {
+ tab.reparentToActivity(mActivity, new TabDelegateFactory());
+ type = TabLaunchType.FROM_REPARENTING;
+ } else if (webContents != null) {
// A WebContents was passed through the Intent. Create a new Tab to hold it.
Intent parentIntent = IntentUtils.safeGetParcelableExtra(
intent, IntentHandler.EXTRA_PARENT_INTENT);

Powered by Google App Engine
This is Rietveld 408576698