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

Unified Diff: chrome/renderer/prerender/prerender_dispatcher.h

Issue 10918189: Add PrerenderStatusEvent on Prerenders (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase to trunk, remove some unrelated fixes... Created 8 years, 1 month 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/common/prerender_messages.h ('k') | chrome/renderer/prerender/prerender_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/common/prerender_messages.h ('k') | chrome/renderer/prerender/prerender_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698