 Chromium Code Reviews
 Chromium Code Reviews Issue 1710853002:
  android: Add a method to let Java know whether a prerender has finished loading.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1710853002:
  android: Add a method to let Java know whether a prerender has finished loading.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <list> | 10 #include <list> | 
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 static bool IsNoUseGroup(); | 185 static bool IsNoUseGroup(); | 
| 186 | 186 | 
| 187 // Query the list of current prerender pages to see if the given web contents | 187 // Query the list of current prerender pages to see if the given web contents | 
| 188 // is prerendering a page. The optional parameter |origin| is an output | 188 // is prerendering a page. The optional parameter |origin| is an output | 
| 189 // parameter which, if a prerender is found, is set to the Origin of the | 189 // parameter which, if a prerender is found, is set to the Origin of the | 
| 190 // prerender |web_contents|. | 190 // prerender |web_contents|. | 
| 191 bool IsWebContentsPrerendering(const content::WebContents* web_contents, | 191 bool IsWebContentsPrerendering(const content::WebContents* web_contents, | 
| 192 Origin* origin) const; | 192 Origin* origin) const; | 
| 193 | 193 | 
| 194 // Whether the PrerenderManager has an active prerender with the given url and | 194 // Whether the PrerenderManager has an active prerender with the given url and | 
| 195 // SessionStorageNamespace associated with the given WebContens. | 195 // SessionStorageNamespace associated with the given WebContents. | 
| 
gavinp
2016/02/25 18:44:55
Thanks. This has bugged me for a while, but never
 | |
| 196 bool HasPrerenderedUrl(GURL url, content::WebContents* web_contents) const; | 196 bool HasPrerenderedUrl(GURL url, content::WebContents* web_contents) const; | 
| 197 | 197 | 
| 198 // Whether the PrerenderManager has an active prerender with the given url and | |
| 199 // SessionStorageNamespace associated with the given WebContents, and that | |
| 200 // prerender has finished loading.. | |
| 201 bool HasPrerenderedAndFinishedLoadingUrl( | |
| 202 GURL url, | |
| 203 content::WebContents* web_contents) const; | |
| 204 | |
| 198 // Returns the PrerenderContents object for the given web_contents, otherwise | 205 // Returns the PrerenderContents object for the given web_contents, otherwise | 
| 199 // returns NULL. Note that the PrerenderContents may have been Destroy()ed, | 206 // returns NULL. Note that the PrerenderContents may have been Destroy()ed, | 
| 200 // but not yet deleted. | 207 // but not yet deleted. | 
| 201 PrerenderContents* GetPrerenderContents( | 208 PrerenderContents* GetPrerenderContents( | 
| 202 const content::WebContents* web_contents) const; | 209 const content::WebContents* web_contents) const; | 
| 203 | 210 | 
| 204 // Returns the PrerenderContents object for a given child_id, route_id pair, | 211 // Returns the PrerenderContents object for a given child_id, route_id pair, | 
| 205 // otherwise returns NULL. Note that the PrerenderContents may have been | 212 // otherwise returns NULL. Note that the PrerenderContents may have been | 
| 206 // Destroy()ed, but not yet deleted. | 213 // Destroy()ed, but not yet deleted. | 
| 207 virtual PrerenderContents* GetPrerenderContentsForRoute( | 214 virtual PrerenderContents* GetPrerenderContentsForRoute( | 
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 // Set of process hosts being prerendered. | 548 // Set of process hosts being prerendered. | 
| 542 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet; | 549 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet; | 
| 543 PrerenderProcessSet prerender_process_hosts_; | 550 PrerenderProcessSet prerender_process_hosts_; | 
| 544 | 551 | 
| 545 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 552 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 
| 546 }; | 553 }; | 
| 547 | 554 | 
| 548 } // namespace prerender | 555 } // namespace prerender | 
| 549 | 556 | 
| 550 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 557 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 
| OLD | NEW |