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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java

Issue 1767243002: Update prerender policy for custom tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke@'s comments Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.AsyncTask; 8 import android.os.AsyncTask;
9 import android.view.ContextThemeWrapper; 9 import android.view.ContextThemeWrapper;
10 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 public void prerenderUrl(final String url, final String referrer, 124 public void prerenderUrl(final String url, final String referrer,
125 final int widthPix, final int heightPix) { 125 final int widthPix, final int heightPix) {
126 ThreadUtils.assertOnUiThread(); 126 ThreadUtils.assertOnUiThread();
127 if (!mPrerenderIsAllowed) return; 127 if (!mPrerenderIsAllowed) return;
128 clearWebContentsIfNecessary(); 128 clearWebContentsIfNecessary();
129 if (mExternalPrerenderHandler == null) { 129 if (mExternalPrerenderHandler == null) {
130 mExternalPrerenderHandler = new ExternalPrerenderHandler(); 130 mExternalPrerenderHandler = new ExternalPrerenderHandler();
131 } 131 }
132 132
133 mPrerenderedWebContents = mExternalPrerenderHandler.addPrerender( 133 mPrerenderedWebContents = mExternalPrerenderHandler.addPrerender(
134 Profile.getLastUsedProfile(), url, referrer, widthPix, heightPix ); 134 Profile.getLastUsedProfile(), url, referrer, widthPix, heightPix , false);
135 if (mPrerenderedWebContents != null) mPrerendered = true; 135 if (mPrerenderedWebContents != null) mPrerendered = true;
136 } 136 }
137 137
138 /** 138 /**
139 * Inflates and constructs the view hierarchy that the app will use. 139 * Inflates and constructs the view hierarchy that the app will use.
140 * @param baseContext The base context to use for creating the ContextWrappe r. 140 * @param baseContext The base context to use for creating the ContextWrappe r.
141 * @param toolbarContainerId Id of the toolbar container. 141 * @param toolbarContainerId Id of the toolbar container.
142 */ 142 */
143 public void initializeViewHierarchy(Context baseContext, int toolbarContaine rId) { 143 public void initializeViewHierarchy(Context baseContext, int toolbarContaine rId) {
144 TraceEvent.begin("WarmupManager.initializeViewHierarchy"); 144 TraceEvent.begin("WarmupManager.initializeViewHierarchy");
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // different profiles, the last one will win. 280 // different profiles, the last one will win.
281 mPendingPreconnectWithProfile.put(url, profile); 281 mPendingPreconnectWithProfile.put(url, profile);
282 } else { 282 } else {
283 nativePreconnectUrlAndSubresources(profile, url); 283 nativePreconnectUrlAndSubresources(profile, url);
284 } 284 }
285 } 285 }
286 } 286 }
287 287
288 private static native void nativePreconnectUrlAndSubresources(Profile profil e, String url); 288 private static native void nativePreconnectUrlAndSubresources(Profile profil e, String url);
289 } 289 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698