Index: chrome/renderer/prerender/prerender_dispatcher.h |
diff --git a/chrome/renderer/prerender/prerender_dispatcher.h b/chrome/renderer/prerender/prerender_dispatcher.h |
index c72620dda11c76cf79025596373b6c7f0080d1b7..b1b562e2b2ac83d48634e2b62ca45dddcf66e5c3 100644 |
--- a/chrome/renderer/prerender/prerender_dispatcher.h |
+++ b/chrome/renderer/prerender/prerender_dispatcher.h |
@@ -6,6 +6,7 @@ |
#define CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ |
#include <map> |
+#include <set> |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
@@ -31,19 +32,25 @@ class PrerenderDispatcher : public content::RenderProcessObserver, |
private: |
friend class PrerenderDispatcherTest; |
- void OnAddPrerenderURL(const GURL& url); |
- void OnRemovePrerenderURL(const GURL& url); |
+ // Message handlers for messages from the browser process. |
+ void OnStartedPrerender(int prerender_id); |
+ void OnAddAliasToPrerender(int prerender_id, const GURL& url); |
+ void OnStoppedPrerender(int prerender_id); |
// From RenderProcessObserver: |
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
- // From WebPrerenderingSupport: |
- virtual void add(const WebKit::WebPrerender& prerender) OVERRIDE; |
- virtual void cancel(const WebKit::WebPrerender& prerender) OVERRIDE; |
- virtual void abandon(const WebKit::WebPrerender& prerender) OVERRIDE; |
+ // From WebKit::WebPrerenderingSupport: |
+ virtual void add(WebKit::WebPrerender* prerender) OVERRIDE; |
+ virtual void cancel(WebKit::WebPrerender* prerender) OVERRIDE; |
+ virtual void abandon(WebKit::WebPrerender* prerender) OVERRIDE; |
- typedef std::map<GURL, int> PrerenderMap; |
- PrerenderMap prerender_urls_; |
+ // From WebKit, prerender elements launched by renderers in our process. |
+ std::map<int, WebKit::WebPrerender*> prerenders_; |
+ |
+ // From the browser process, which prerenders have been launched. |
+ std::multimap<int, GURL> prerender_aliases_; |
+ std::set<int> running_prerenders_; |
}; |
} // namespace prerender |