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

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: Fixes PrerenderAllowedForOfflineAndForcedCellular 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
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index 692d971df9b23ad5e3d1633115bf175237054b14..d64fc202f41b789a4e6d7a764e3445c32a313363 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 for a swap-in;
+ // 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();
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698