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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // parameter which, if a prerender is found, is set to the Origin of the | 188 // parameter which, if a prerender is found, is set to the Origin of the |
189 // prerender |web_contents|. | 189 // prerender |web_contents|. |
190 bool IsWebContentsPrerendering(content::WebContents* web_contents, | 190 bool IsWebContentsPrerendering(content::WebContents* web_contents, |
191 Origin* origin) const; | 191 Origin* origin) const; |
192 | 192 |
193 // Returns the PrerenderContents object for the given web_contents if it's | 193 // Returns the PrerenderContents object for the given web_contents if it's |
194 // used for an active prerender page, otherwise returns NULL. | 194 // used for an active prerender page, otherwise returns NULL. |
195 PrerenderContents* GetPrerenderContents( | 195 PrerenderContents* GetPrerenderContents( |
196 content::WebContents* web_contents) const; | 196 content::WebContents* web_contents) const; |
197 | 197 |
| 198 // Returns a list of all WebContents being prerendered. |
| 199 const std::vector<content::WebContents*> GetAllPrerenderingContents() const; |
| 200 |
198 // Maintaining and querying the set of WebContents belonging to this | 201 // Maintaining and querying the set of WebContents belonging to this |
199 // PrerenderManager that are currently showing prerendered pages. | 202 // PrerenderManager that are currently showing prerendered pages. |
200 void MarkWebContentsAsPrerendered(content::WebContents* web_contents, | 203 void MarkWebContentsAsPrerendered(content::WebContents* web_contents, |
201 Origin origin); | 204 Origin origin); |
202 void MarkWebContentsAsWouldBePrerendered(content::WebContents* web_contents, | 205 void MarkWebContentsAsWouldBePrerendered(content::WebContents* web_contents, |
203 Origin origin); | 206 Origin origin); |
204 void MarkWebContentsAsNotPrerendered(content::WebContents* web_contents); | 207 void MarkWebContentsAsNotPrerendered(content::WebContents* web_contents); |
205 | 208 |
206 // Returns true if |web_contents| was originally a prerender that has since | 209 // Returns true if |web_contents| was originally a prerender that has since |
207 // been swapped in. The optional parameter |origin| is an output parameter | 210 // been swapped in. The optional parameter |origin| is an output parameter |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 579 |
577 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 580 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
578 }; | 581 }; |
579 | 582 |
580 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 583 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
581 int render_process_id); | 584 int render_process_id); |
582 | 585 |
583 } // namespace prerender | 586 } // namespace prerender |
584 | 587 |
585 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 588 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |