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

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

Issue 6255005: Browser test for prerendering in general (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Added missing file (again) 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
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.h
===================================================================
--- chrome/browser/prerender/prerender_contents.h (revision 72537)
+++ chrome/browser/prerender/prerender_contents.h (working copy)
@@ -36,9 +36,25 @@
public NotificationObserver,
public JavaScriptAppModalDialogDelegate {
public:
- PrerenderContents(PrerenderManager* prerender_manager, Profile* profile,
- const GURL& url, const std::vector<GURL>& alias_urls);
+ // PrerenderContents::Create uses the currently registered Factory to create
+ // the PrerenderContents. Factory is intended for testing.
+ class Factory {
+ public:
+ Factory() {}
+ virtual ~Factory() {}
+
+ virtual PrerenderContents* CreatePrerenderContents(
+ PrerenderManager* prerender_manager, Profile* profile, const GURL& url,
+ const std::vector<GURL>& alias_urls) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Factory);
+ };
+
virtual ~PrerenderContents();
+
+ static Factory* CreateFactory();
+
virtual void StartPrerendering();
RenderViewHost* render_view_host() { return render_view_host_; }
@@ -137,10 +153,16 @@
virtual void ClearInspectorSettings();
protected:
+ PrerenderContents(PrerenderManager* prerender_manager, Profile* profile,
+ const GURL& url, const std::vector<GURL>& alias_urls);
+
// from RenderViewHostDelegate.
virtual bool OnMessageReceived(const IPC::Message& message);
private:
+ // Needs to be able to call the constructor.
+ friend class PrerenderContentsFactoryImpl;
+
// Message handlers.
void OnDidStartProvisionalLoadForFrame(int64 frame_id,
bool main_frame,
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698