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

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

Issue 11316311: Make PrerenderHandle an observer of PrerenderContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase trunk & add upstream remediation Created 8 years 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 b41e02c4a27bc67a930e9d62de1c5cf4384679c8..6d04f733dfcf02a501e25eb42bb694222496f7b7 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -79,6 +79,10 @@ class PrerenderContents : public content::NotificationObserver,
// Signals that the prerender has stopped running.
virtual void OnPrerenderStop(PrerenderContents* contents) = 0;
+ // Signals the discovery, through redirects, of a new alias for this
+ // prerender.
+ virtual void OnPrerenderAddAlias(PrerenderContents* contents,
+ const GURL& alias_url);
protected:
Observer();
virtual ~Observer() = 0;
@@ -129,8 +133,10 @@ class PrerenderContents : public content::NotificationObserver,
virtual ~PrerenderContents();
// All observers of a PrerenderContents are removed after the OnPrerenderStop
- // event is sent, so there is no need for a RemoveObserver() method.
+ // event is sent, so there is no need to call RemoveObserver() in the normal
+ // use case.
void AddObserver(Observer* observer);
+ void RemoveObserver(Observer* observer);
// For MatchComplete correctness, create a dummy replacement prerender
// contents to stand in for this prerender contents that (which we are about
@@ -282,6 +288,7 @@ class PrerenderContents : public content::NotificationObserver,
// These call out to methods on our Observers, using our observer_list_.
void NotifyPrerenderStart();
void NotifyPrerenderStop();
+ void NotifyPrerenderAddAlias(const GURL& alias_url);
// Called whenever a RenderViewHost is created for prerendering. Only called
// once the RenderViewHost has a RenderView and RenderWidgetHostView.
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | chrome/browser/prerender/prerender_handle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698