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

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

Issue 6171007: For prerendering, keep track of all the intermediate redirects, and hook into... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
===================================================================
--- chrome/browser/prerender/prerender_contents.h (revision 71174)
+++ chrome/browser/prerender/prerender_contents.h (working copy)
@@ -52,6 +52,10 @@
string16 title() const { return title_; }
int32 page_id() const { return page_id_; }
+ // Indicates whether this prerendered page can be used for the provided
+ // URL, i.e. whether there is a match.
+ bool MatchesUrl(const GURL& url);
+
// RenderViewHostDelegate implementation.
virtual RenderViewHostDelegate::View* GetViewDelegate();
virtual const GURL& GetURL() const;
@@ -133,7 +137,21 @@
const std::string& value);
virtual void ClearInspectorSettings();
+ protected:
+ // from renderViewHostDelegate.
+ virtual bool OnMessageReceived(const IPC::Message& message);
+
private:
+ // Message handlers.
+ void OnDidStartProvisionalLoadForFrame(int64 frame_id,
+ bool main_frame,
+ const GURL& url);
+ void OnDidRedirectProvisionalLoad(int32 page_id,
+ const GURL& source_url,
+ const GURL& target_url);
+
+ void AddMatchingUrl(const GURL& url);
+
// The prerender manager owning this object.
PrerenderManager* prerender_manager_;
@@ -162,6 +180,11 @@
GURL url_;
NotificationRegistrar registrar_;
+ // A vector of URLs that this prerendered page matches against.
+ // This array can contain more than element as a result of redirects,
+ // such as HTTP redirects or javascript redirects.
+ std::vector<GURL> matching_urls_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
};
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | chrome/browser/prerender/prerender_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698