| 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_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Adds a prerender for |url| if valid. |process_id| and |route_id| identify | 116 // Adds a prerender for |url| if valid. |process_id| and |route_id| identify |
| 117 // the RenderView that the prerender request came from. If |size| is empty, a | 117 // the RenderView that the prerender request came from. If |size| is empty, a |
| 118 // default from the PrerenderConfig is used. Returns a caller-owned | 118 // default from the PrerenderConfig is used. Returns a caller-owned |
| 119 // PrerenderHandle* if the URL was added, NULL if it was not. If the launching | 119 // PrerenderHandle* if the URL was added, NULL if it was not. If the launching |
| 120 // RenderView is itself prerendering, the prerender is added as a pending | 120 // RenderView is itself prerendering, the prerender is added as a pending |
| 121 // prerender. | 121 // prerender. |
| 122 PrerenderHandle* AddPrerenderFromLinkRelPrerender( | 122 PrerenderHandle* AddPrerenderFromLinkRelPrerender( |
| 123 int process_id, | 123 int process_id, |
| 124 int route_id, | 124 int route_id, |
| 125 const GURL& url, | 125 const GURL& url, |
| 126 uint32 rel_types, |
| 126 const content::Referrer& referrer, | 127 const content::Referrer& referrer, |
| 127 const gfx::Size& size); | 128 const gfx::Size& size); |
| 128 | 129 |
| 129 // Adds a prerender for |url| if valid. As the prerender request is coming | 130 // Adds a prerender for |url| if valid. As the prerender request is coming |
| 130 // from a source without a RenderViewHost (i.e., the omnibox) we don't have a | 131 // from a source without a RenderViewHost (i.e., the omnibox) we don't have a |
| 131 // child or route id, or a referrer. This method uses sensible values for | 132 // child or route id, or a referrer. This method uses sensible values for |
| 132 // those. The |session_storage_namespace| matches the namespace of the active | 133 // those. The |session_storage_namespace| matches the namespace of the active |
| 133 // tab at the time the prerender is generated from the omnibox. Returns a | 134 // tab at the time the prerender is generated from the omnibox. Returns a |
| 134 // caller-owned PrerenderHandle*, or NULL. | 135 // caller-owned PrerenderHandle*, or NULL. |
| 135 PrerenderHandle* AddPrerenderFromOmnibox( | 136 PrerenderHandle* AddPrerenderFromOmnibox( |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 content::NotificationRegistrar notification_registrar_; | 693 content::NotificationRegistrar notification_registrar_; |
| 693 | 694 |
| 694 CancelableRequestConsumer query_url_consumer_; | 695 CancelableRequestConsumer query_url_consumer_; |
| 695 | 696 |
| 696 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 697 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 697 }; | 698 }; |
| 698 | 699 |
| 699 } // namespace prerender | 700 } // namespace prerender |
| 700 | 701 |
| 701 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 702 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |