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

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

Issue 2043833003: customtabs: Initialize the spare renderer using the new WebContents method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proguard fix for a test. Created 4 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/WebContentsFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WebContentsFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/WebContentsFactory.java
index 49ac2e299e82168abd3e496a95544f54cbdb9603..f31a7bfa3c4969f36b8ae7af1a2b52835441c839 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/WebContentsFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/WebContentsFactory.java
@@ -23,9 +23,24 @@ public abstract class WebContentsFactory {
* @return A newly created {@link WebContents} object.
*/
public static WebContents createWebContents(boolean incognito, boolean initiallyHidden) {
- return nativeCreateWebContents(incognito, initiallyHidden);
+ return nativeCreateWebContents(incognito, initiallyHidden, false);
}
- private static native WebContents nativeCreateWebContents(boolean incognito,
- boolean initiallyHidden);
+ /**
+ * A factory method to build a {@link WebContents} object.
+ *
+ * Also creates and initializes the renderer.
+ *
+ * @param incognito Whether or not the {@link WebContents} should be built with an
+ * off-the-record profile or not.
+ * @param initiallyHidden Whether or not the {@link WebContents} should be initially hidden.
+ * @return A newly created {@link WebContents} object.
+ */
+ public static WebContents createWebContentsWithWarmRenderer(
+ boolean incognito, boolean initiallyHidden) {
+ return nativeCreateWebContents(incognito, initiallyHidden, true);
+ }
+
+ private static native WebContents nativeCreateWebContents(
+ boolean incognito, boolean initiallyHidden, boolean initializeRenderer);
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698