| 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 <memory> | 10 #include <memory> |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // outside that range indicating that it doesn't apply. | 194 // outside that range indicating that it doesn't apply. |
| 195 void RecordPerceivedPageLoadTime( | 195 void RecordPerceivedPageLoadTime( |
| 196 Origin origin, | 196 Origin origin, |
| 197 NavigationType navigation_type, | 197 NavigationType navigation_type, |
| 198 base::TimeDelta perceived_page_load_time, | 198 base::TimeDelta perceived_page_load_time, |
| 199 double fraction_plt_elapsed_at_swap_in, | 199 double fraction_plt_elapsed_at_swap_in, |
| 200 const GURL& url); | 200 const GURL& url); |
| 201 | 201 |
| 202 static PrerenderManagerMode GetMode(); | 202 static PrerenderManagerMode GetMode(); |
| 203 static void SetMode(PrerenderManagerMode mode); | 203 static void SetMode(PrerenderManagerMode mode); |
| 204 static const char* GetModeString(); | |
| 205 static bool IsPrerenderingPossible(); | 204 static bool IsPrerenderingPossible(); |
| 206 static bool ActuallyPrerendering(); | 205 static bool ActuallyPrerendering(); |
| 207 static bool IsControlGroup(); | 206 static bool IsControlGroup(); |
| 208 static bool IsNoUseGroup(); | 207 static bool IsNoUseGroup(); |
| 209 static bool IsNoStatePrefetch(); | 208 static bool IsNoStatePrefetch(); |
| 210 | 209 |
| 211 // Query the list of current prerender pages to see if the given web contents | 210 // Query the list of current prerender pages to see if the given web contents |
| 212 // is prerendering a page. The optional parameter |origin| is an output | 211 // is prerendering a page. The optional parameter |origin| is an output |
| 213 // parameter which, if a prerender is found, is set to the Origin of the | 212 // parameter which, if a prerender is found, is set to the Origin of the |
| 214 // prerender |web_contents|. | 213 // prerender |web_contents|. |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 // Set of process hosts being prerendered. | 562 // Set of process hosts being prerendered. |
| 564 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; | 563 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; |
| 565 PrerenderProcessSet prerender_process_hosts_; | 564 PrerenderProcessSet prerender_process_hosts_; |
| 566 | 565 |
| 567 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 566 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 568 }; | 567 }; |
| 569 | 568 |
| 570 } // namespace prerender | 569 } // namespace prerender |
| 571 | 570 |
| 572 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 571 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |