Chromium Code Reviews| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 | 144 |
| 145 // Adds a prerender for Instant Search |url| if valid. The | 145 // Adds a prerender for Instant Search |url| if valid. The |
| 146 // |session_storage_namespace| matches the namespace of the active tab at the | 146 // |session_storage_namespace| matches the namespace of the active tab at the |
| 147 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or | 147 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or |
| 148 // NULL. | 148 // NULL. |
| 149 PrerenderHandle* AddPrerenderForInstant( | 149 PrerenderHandle* AddPrerenderForInstant( |
| 150 const GURL& url, | 150 const GURL& url, |
| 151 content::SessionStorageNamespace* session_storage_namespace, | 151 content::SessionStorageNamespace* session_storage_namespace, |
| 152 const gfx::Size& size); | 152 const gfx::Size& size); |
| 153 | 153 |
| 154 // Adds a prerender for offline page loader that will prerender even on | |
| 155 // cellular networks as long as the user setting for prerendering is ON. | |
|
pasko
2016/04/04 17:04:22
The last part is no longer true?
gabadie
2016/04/04 19:42:50
Good point. Done.
| |
| 156 PrerenderHandle* AddPrerenderForOffline( | |
| 157 const GURL& url, | |
| 158 content::SessionStorageNamespace* session_storage_namespace, | |
| 159 const gfx::Size& size); | |
| 160 | |
| 154 // Cancels all active prerenders. | 161 // Cancels all active prerenders. |
| 155 void CancelAllPrerenders(); | 162 void CancelAllPrerenders(); |
| 156 | 163 |
| 157 // If |url| matches a valid prerendered page and |params| are compatible, try | 164 // If |url| matches a valid prerendered page and |params| are compatible, try |
| 158 // to swap it and merge browsing histories. Returns |true| and updates | 165 // to swap it and merge browsing histories. Returns |true| and updates |
| 159 // |params->target_contents| if a prerendered page is swapped in, |false| | 166 // |params->target_contents| if a prerendered page is swapped in, |false| |
| 160 // otherwise. | 167 // otherwise. |
| 161 bool MaybeUsePrerenderedPage(const GURL& url, | 168 bool MaybeUsePrerenderedPage(const GURL& url, |
| 162 chrome::NavigateParams* params); | 169 chrome::NavigateParams* params); |
| 163 | 170 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 // Set of process hosts being prerendered. | 568 // Set of process hosts being prerendered. |
| 562 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet; | 569 typedef std::set<content::RenderProcessHost*> PrerenderProcessSet; |
| 563 PrerenderProcessSet prerender_process_hosts_; | 570 PrerenderProcessSet prerender_process_hosts_; |
| 564 | 571 |
| 565 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 572 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 566 }; | 573 }; |
| 567 | 574 |
| 568 } // namespace prerender | 575 } // namespace prerender |
| 569 | 576 |
| 570 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 577 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |