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

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

Issue 1731673002: Add tab reparenting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove test 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/TabModel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
index 287af15da2dbd4d85b8fc6fd351c2b37c48ffe8d..dced692244dd1757add5f1599c5bad8b8c3b3f09 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
@@ -47,7 +47,12 @@ public interface TabModel extends TabList {
* Opened from the long press context menu. Will not be brought to the foreground.
* Like FROM_CHROME_UI, but also sets up a parent/child relationship like FROM_LINK.
*/
- FROM_LONGPRESS_BACKGROUND
+ FROM_LONGPRESS_BACKGROUND,
+
+ /**
+ * Changed windows by moving from one activity to another. Will be opened in the foreground.
+ */
+ FROM_REPARENTING
}
/**
@@ -181,6 +186,13 @@ public interface TabModel extends TabList {
void addTab(Tab tab, int index, TabLaunchType type);
/**
+ * Removes the given tab from the model without destroying it. The tab should be inserted into
+ * another model to avoid leaking as after this the link to the old Activity will be broken.
+ * @param tab The tab to remove.
+ */
+ void removeTab(Tab tab);
+
+ /**
* Subscribes a {@link TabModelObserver} to be notified about changes to this model.
* @param observer The observer to be subscribed.
*/

Powered by Google App Engine
This is Rietveld 408576698