Chromium Code Reviews| Index: chrome/browser/prerender/prerender_contents.h |
| =================================================================== |
| --- chrome/browser/prerender/prerender_contents.h (revision 71174) |
| +++ chrome/browser/prerender/prerender_contents.h (working copy) |
| @@ -40,6 +40,7 @@ |
| const GURL& url); |
| virtual ~PrerenderContents(); |
| virtual void StartPrerendering(); |
| + void AddAliasURLs(const std::vector<GURL>& alias_urls); |
|
cbentzel
2011/01/12 23:49:53
Why not just pass in the alias_urls to the Prerend
tburkard
2011/01/13 19:14:16
Done.
|
| RenderViewHost* render_view_host() { return render_view_host_; } |
| // Allows replacing of the RenderViewHost owned by this class, including |
| @@ -52,6 +53,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); |
|
cbentzel
2011/01/12 23:49:53
Nit: MatchesURL instead of MatchesUrl to be consis
tburkard
2011/01/13 19:14:16
Done.
|
| + |
| // RenderViewHostDelegate implementation. |
| virtual RenderViewHostDelegate::View* GetViewDelegate(); |
| virtual const GURL& GetURL() const; |
| @@ -133,7 +138,21 @@ |
| const std::string& value); |
| virtual void ClearInspectorSettings(); |
| + protected: |
| + // from renderViewHostDelegate. |
| + virtual bool OnMessageReceived(const IPC::Message& message); |
|
cbentzel
2011/01/12 23:49:53
I think it's OK to make this private as well.
tburkard
2011/01/13 19:14:16
TabContents has it protected, too, so i figured pr
|
| + |
| 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); |
|
cbentzel
2011/01/12 23:49:53
Nit: AddMatchingURL
tburkard
2011/01/13 19:14:16
Done.
|
| + |
| // The prerender manager owning this object. |
| PrerenderManager* prerender_manager_; |
| @@ -162,6 +181,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); |
| }; |