| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // Adds a prerender for Instant Search |url| if valid. The | 164 // Adds a prerender for Instant Search |url| if valid. The |
| 165 // |session_storage_namespace| matches the namespace of the active tab at the | 165 // |session_storage_namespace| matches the namespace of the active tab at the |
| 166 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or | 166 // time the prerender is generated. Returns a caller-owned PrerenderHandle* or |
| 167 // NULL. | 167 // NULL. |
| 168 PrerenderHandle* AddPrerenderForInstant( | 168 PrerenderHandle* AddPrerenderForInstant( |
| 169 const GURL& url, | 169 const GURL& url, |
| 170 content::SessionStorageNamespace* session_storage_namespace, | 170 content::SessionStorageNamespace* session_storage_namespace, |
| 171 const gfx::Size& size); | 171 const gfx::Size& size); |
| 172 | 172 |
| 173 // If |process_id| and |view_id| refer to a running prerender, destroy | |
| 174 // it with |final_status|. | |
| 175 virtual void DestroyPrerenderForRenderView(int process_id, | |
| 176 int view_id, | |
| 177 FinalStatus final_status); | |
| 178 | |
| 179 // Cancels all active prerenders. | 173 // Cancels all active prerenders. |
| 180 void CancelAllPrerenders(); | 174 void CancelAllPrerenders(); |
| 181 | 175 |
| 182 // If |url| matches a valid prerendered page and |params| are compatible, try | 176 // If |url| matches a valid prerendered page and |params| are compatible, try |
| 183 // to swap it and merge browsing histories. Returns |true| and updates | 177 // to swap it and merge browsing histories. Returns |true| and updates |
| 184 // |params->target_contents| if a prerendered page is swapped in, |false| | 178 // |params->target_contents| if a prerendered page is swapped in, |false| |
| 185 // otherwise. | 179 // otherwise. |
| 186 bool MaybeUsePrerenderedPage(const GURL& url, | 180 bool MaybeUsePrerenderedPage(const GURL& url, |
| 187 chrome::NavigateParams* params); | 181 chrome::NavigateParams* params); |
| 188 | 182 |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 745 |
| 752 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 746 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 753 }; | 747 }; |
| 754 | 748 |
| 755 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 749 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
| 756 int render_process_id); | 750 int render_process_id); |
| 757 | 751 |
| 758 } // namespace prerender | 752 } // namespace prerender |
| 759 | 753 |
| 760 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 754 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |