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

Unified Diff: chrome/browser/prerender/prerender_manager.h

Issue 1854643002: Implement PrerenderManager::AddPrerenderForOffline() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverts changes of chrome/chrome_browser.gypi Created 4 years, 8 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/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index c33c540657d6824793f8f84767a7b6c91f52eb00..e133e7188d15dd21c4cb30ecd9c65eebc33a9703 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -151,6 +151,22 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
content::SessionStorageNamespace* session_storage_namespace,
const gfx::Size& size);
+ // Adds a prerender for the background loader. Returns a caller-owned
+ // PrerenderHandle* if the URL was added, NULL if it was not.
+ //
+ // The caller may set an observer on the handle to receive load events. When
+ // the caller is done using the WebContents, it should call OnCancel() on the
+ // handle to free the resources associated with the prerender.
+ //
+ // The caller must provide two guarantees:
+ // 1. It must never ask to as for a swap-in;
mmenke 2016/04/22 16:41:33 -"to as"
gabadie 2016/04/25 11:08:24 Done.
+ // 2. The SessionStorageNamespace must not be shared with any tab / page load
+ // to avoid swapping in from there.
+ PrerenderHandle* AddPrerenderForOffline(
+ const GURL& url,
+ content::SessionStorageNamespace* session_storage_namespace,
+ const gfx::Size& size);
+
// Cancels all active prerenders.
void CancelAllPrerenders();

Powered by Google App Engine
This is Rietveld 408576698