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

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

Issue 10553029: Handle interface to prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/browser/prerender/prerender_contents.h
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h
index 0e1f4988ba8c0b2deccd458cd7c08153ff205096..413e2485d1000302b9f99330838eaf0f92737a36 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -15,6 +15,7 @@
#include "base/time.h"
#include "base/values.h"
#include "chrome/browser/prerender/prerender_final_status.h"
+#include "chrome/browser/prerender/prerender_handle.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -95,7 +96,7 @@ class PrerenderContents : public content::NotificationObserver,
virtual ~PrerenderContents();
- bool Init();
+ bool Init(WeakPrerenderHandle prerender);
dominich 2012/06/18 15:32:44 PrerenderHandle* or const PrerenderHandle& or base
static Factory* CreateFactory();
@@ -156,11 +157,10 @@ class PrerenderContents : public content::NotificationObserver,
base::TimeTicks load_start_time() const { return load_start_time_; }
// Indicates whether this prerendered page can be used for the provided
- // URL, i.e. whether there is a match. |matching_url| is optional and will be
- // set to the URL that is found as a match if it is provided.
- // TODO(gavinp,mmenke): Rework matching to be based on both the URL
- // and the session WebStorage.
- bool MatchesURL(const GURL& url, GURL* matching_url) const;
+ // |url| and |session_storage_namespace|.
+ bool Matches(
+ const GURL& url,
+ const content::SessionStorageNamespace* session_storage_namespace) const;
void OnJSOutOfMemory();
bool ShouldSuppressDialogs();
@@ -216,9 +216,9 @@ class PrerenderContents : public content::NotificationObserver,
bool IsCrossSiteNavigationPending() const;
// Adds a pending prerender to the list.
- virtual void AddPendingPrerender(const GURL& url,
- const content::Referrer& referrer,
- const gfx::Size& size);
+ virtual PrerenderHandle AddPendingPrerender(const GURL& url,
dominich 2012/06/18 15:32:44 so this will copy the PrerenderHandle on return? T
gavinp 2012/06/18 16:40:48 The PrerenderHandle is a machine word in size.
+ const content::Referrer& referrer,
+ const gfx::Size& size);
// Returns true if |url| corresponds to a pending prerender.
bool IsPendingEntry(const GURL& url) const;
@@ -281,6 +281,8 @@ class PrerenderContents : public content::NotificationObserver,
// The prerender tracker tracking prerenders.
PrerenderTracker* prerender_tracker_;
+ WeakPrerenderHandle prerender_;
+
// The URL being prerendered.
GURL prerender_url_;

Powered by Google App Engine
This is Rietveld 408576698