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

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

Issue 1174263006: [Document mode] Force more pathways to use the TabDelegate instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Null guarding Created 5 years, 6 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/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
index aae8306d29df061797cbdcc659f5575107a8d8ad..65e7dc8be41d5c0ed31691486e07c63eed006280 100644
--- 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
@@ -9,6 +9,7 @@ import android.app.Activity;
import org.chromium.chrome.browser.Tab;
import org.chromium.chrome.browser.tabmodel.TabCreatorManager.TabCreator;
import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
+import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.WebContents;
/**
@@ -24,12 +25,25 @@ public interface TabDelegate extends TabCreator {
Tab getActivityTab(ActivityDelegate activityDelegate, Activity activity);
/**
- * Creates a Tab to host the given WebContents.
+ * Creates a Tab to host the given WebContents asynchronously.
* @param webContents WebContents that has been pre-created.
* @param parentId ID of the parent Tab.
* @param type Launch type for the Tab.
* @param startedBy See {@link DocumentMetricIds}.
*/
- Tab createTabWithWebContents(
+ void createTabWithWebContents(
WebContents webContents, int parentId, TabLaunchType type, int startedBy);
+
+ /**
+ * Creates a new DocumentTab asynchronously. Generally, you should use createNewTab() instead.
+ * @param loadUrlParams parameters of the url load.
+ * @param type Information about how the tab was launched.
+ * @param parent the parent tab, if present.
+ * @param documentLaunchMode Launch mode for the DocumentActivity.
+ * @param documentStartedBy Reason that the DocumentActivity is being started.
+ * {@see DocumentMetricIds}.
+ * @param requestId ServiceTabLauncher ID for the request.
+ */
+ void createNewDocumentTab(LoadUrlParams loadUrlParams, TabLaunchType type, Tab parent,
+ int documentLaunchMode, int documentStartedBy, Integer requestId);
}

Powered by Google App Engine
This is Rietveld 408576698