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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Adds a prerender for |url| if valid. |process_id| and |route_id| identify | 129 // Adds a prerender for |url| if valid. |process_id| and |route_id| identify |
130 // the RenderView that the prerender request came from. If |size| is empty, a | 130 // the RenderView that the prerender request came from. If |size| is empty, a |
131 // default from the PrerenderConfig is used. Returns a caller-owned | 131 // default from the PrerenderConfig is used. Returns a caller-owned |
132 // PrerenderHandle* if the URL was added, NULL if it was not. If the launching | 132 // PrerenderHandle* if the URL was added, NULL if it was not. If the launching |
133 // RenderView is itself prerendering, the prerender is added as a pending | 133 // RenderView is itself prerendering, the prerender is added as a pending |
134 // prerender. | 134 // prerender. |
135 PrerenderHandle* AddPrerenderFromLinkRelPrerender( | 135 PrerenderHandle* AddPrerenderFromLinkRelPrerender( |
136 int process_id, | 136 int process_id, |
137 int route_id, | 137 int route_id, |
138 const GURL& url, | 138 const GURL& url, |
| 139 uint32 rel_types, |
139 const content::Referrer& referrer, | 140 const content::Referrer& referrer, |
140 const gfx::Size& size); | 141 const gfx::Size& size); |
141 | 142 |
142 // Adds a prerender for |url| if valid. As the prerender request is coming | 143 // Adds a prerender for |url| if valid. As the prerender request is coming |
143 // from a source without a RenderViewHost (i.e., the omnibox) we don't have a | 144 // from a source without a RenderViewHost (i.e., the omnibox) we don't have a |
144 // child or route id, or a referrer. This method uses sensible values for | 145 // child or route id, or a referrer. This method uses sensible values for |
145 // those. The |session_storage_namespace| matches the namespace of the active | 146 // those. The |session_storage_namespace| matches the namespace of the active |
146 // tab at the time the prerender is generated from the omnibox. Returns a | 147 // tab at the time the prerender is generated from the omnibox. Returns a |
147 // caller-owned PrerenderHandle*, or NULL. | 148 // caller-owned PrerenderHandle*, or NULL. |
148 PrerenderHandle* AddPrerenderFromOmnibox( | 149 PrerenderHandle* AddPrerenderFromOmnibox( |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 | 752 |
752 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 753 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
753 }; | 754 }; |
754 | 755 |
755 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 756 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
756 int render_process_id); | 757 int render_process_id); |
757 | 758 |
758 } // namespace prerender | 759 } // namespace prerender |
759 | 760 |
760 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 761 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |