OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
dominich
2012/02/28 16:21:00
nit: 2012
cbentzel
2012/02/29 18:16:13
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ | |
6 #define CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ | |
7 #pragma once | |
8 | |
9 #include <map> | |
10 | |
11 #include "base/compiler_specific.h" | |
12 #include "content/public/renderer/render_process_observer.h" | |
13 | |
14 class GURL; | |
15 | |
16 namespace prerender { | |
17 | |
18 // PrerenderDispatcher pays attention to which URLs are prerendered. | |
dominich
2012/02/28 16:21:00
nit: 'pays attention to' is a bit vague. What does
cbentzel
2012/02/29 18:16:13
Improved description.
| |
19 class PrerenderDispatcher : public content::RenderProcessObserver { | |
20 public: | |
21 bool IsPrerenderURL(const GURL & url) const; | |
22 | |
23 private: | |
24 void OnAddPrerenderURL(const GURL& url); | |
25 void OnRemovePrerenderURL(const GURL& url); | |
26 | |
27 // RenderProcessObserver: | |
28 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | |
29 | |
30 typedef std::map<GURL, int> PrerenderMap; | |
31 std::map<GURL, int> prerender_urls_; | |
dominich
2012/02/28 16:21:00
nit: use PrerenderMap in this declaration.
cbentzel
2012/02/29 18:16:13
Nice catch. Done.
| |
32 }; | |
33 | |
34 } // namespace prerender | |
35 | |
36 #endif // CHROME_RENDERER_PRERENDER_PRERENDER_HELPER_H_ | |
OLD | NEW |