| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ | 6 #define CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "content/public/renderer/render_process_observer.h" | 14 #include "content/public/renderer/render_process_observer.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebPrerender.h" | 15 #include "third_party/WebKit/public/platform/WebPrerender.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebPrerenderingSupp
ort.h" | 16 #include "third_party/WebKit/public/platform/WebPrerenderingSupport.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 | 19 |
| 20 namespace prerender { | 20 namespace prerender { |
| 21 | 21 |
| 22 // There is one PrerenderDispatcher per render process. It keeps track of which | 22 // There is one PrerenderDispatcher per render process. It keeps track of which |
| 23 // prerenders were launched from this renderer, and ensures prerender navigation | 23 // prerenders were launched from this renderer, and ensures prerender navigation |
| 24 // is triggered on navigation to those. It implements the prerendering interface | 24 // is triggered on navigation to those. It implements the prerendering interface |
| 25 // supplied to WebKit. | 25 // supplied to WebKit. |
| 26 class PrerenderDispatcher : public content::RenderProcessObserver, | 26 class PrerenderDispatcher : public content::RenderProcessObserver, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 53 std::map<int, WebKit::WebPrerender> prerenders_; | 53 std::map<int, WebKit::WebPrerender> prerenders_; |
| 54 | 54 |
| 55 // From the browser process, which prerenders are running, indexed by URL. | 55 // From the browser process, which prerenders are running, indexed by URL. |
| 56 // Updated by the browser processes as aliases are discovered. | 56 // Updated by the browser processes as aliases are discovered. |
| 57 std::multiset<GURL> running_prerender_urls_; | 57 std::multiset<GURL> running_prerender_urls_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace prerender | 60 } // namespace prerender |
| 61 | 61 |
| 62 #endif // CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ | 62 #endif // CHROME_RENDERER_PRERENDER_PRERENDER_DISPATCHER_H_ |
| OLD | NEW |