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

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

Issue 802343003: Upstream DocumentTabModelImpl and related classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved package, added OWNERS Created 6 years 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/document/TabDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..f152845dd886ae97802bcfdcce66bb82a9aec142
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.tabmodel.document;
+
+import android.app.Activity;
+
+import org.chromium.chrome.browser.Tab;
+import org.chromium.chrome.browser.tabmodel.document.DocumentTabModel.Entry;
+
+/**
+ * Provides Tabs to a DocumentTabModel.
+ */
+public interface TabDelegate {
+ /**
+ * Returns the Tab for the given Activity.
+ * @param incognito Whether the Activity is supposed to hold an incognito Tab.
+ * @param delgate Sotres information about DocumentActivities.
+ * @param activity Activity to grab the Tab of.
+ * @return Tab for the DocumentActivity, if it is a valid DocumentActivity. Null otherwise.
+ */
+ Tab getActivityTab(boolean incognito, ActivityDelegate delgate, Activity activity);
+
+ /**
+ * Creates a frozen Tab for the Entry.
+ * @param entry Entry containing TabState.
+ * @return A frozen Tab.
+ */
+ Tab createFrozenTab(Entry entry);
+
+ /**
+ * Creates a new Activity for the pre-created WebContents.
+ * @param isIncognito Whether the Activity is supposed to hold an incognito Tab.
+ * @param webContentsPtr Native-side WebContents pointer to use for the new Tab.
+ * @param parentTabId ID of the spawning Tab.
+ */
+ void createTabWithNativeContents(boolean isIncognito, long webContentsPtr, int parentTabId);
+
+ /**
+ * Creates a new Tab for a URL typed into DevTools.
+ * @param url URL to spawn a Tab for.
+ */
+ void createTabForDevTools(String url);
+}

Powered by Google App Engine
This is Rietveld 408576698