| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Set whether prerendering is currently enabled for this manager. | 146 // Set whether prerendering is currently enabled for this manager. |
| 147 // Must be called on the UI thread. | 147 // Must be called on the UI thread. |
| 148 // If |enabled| is false, existing prerendered pages will still persist until | 148 // If |enabled| is false, existing prerendered pages will still persist until |
| 149 // they time out, but new ones will not be generated. | 149 // they time out, but new ones will not be generated. |
| 150 void set_enabled(bool enabled); | 150 void set_enabled(bool enabled); |
| 151 | 151 |
| 152 static PrerenderManagerMode GetMode(); | 152 static PrerenderManagerMode GetMode(); |
| 153 static void SetMode(PrerenderManagerMode mode); | 153 static void SetMode(PrerenderManagerMode mode); |
| 154 static bool IsPrerenderingPossible(); | 154 static bool IsPrerenderingPossible(); |
| 155 static bool IsControlGroup(); | 155 static bool IsControlGroup(); |
| 156 static bool IsNoUseGroup(); |
| 156 | 157 |
| 157 // Query the list of current prerender pages to see if the given tab contents | 158 // Query the list of current prerender pages to see if the given tab contents |
| 158 // is prerendering a page. | 159 // is prerendering a page. |
| 159 bool IsTabContentsPrerendering(TabContents* tab_contents) const; | 160 bool IsTabContentsPrerendering(TabContents* tab_contents) const; |
| 160 | 161 |
| 161 // Maintaining and querying the set of TabContents belonging to this | 162 // Maintaining and querying the set of TabContents belonging to this |
| 162 // PrerenderManager that are currently showing prerendered pages. | 163 // PrerenderManager that are currently showing prerendered pages. |
| 163 void MarkTabContentsAsPrerendered(TabContents* tab_contents); | 164 void MarkTabContentsAsPrerendered(TabContents* tab_contents); |
| 164 void MarkTabContentsAsWouldBePrerendered(TabContents* tab_contents); | 165 void MarkTabContentsAsWouldBePrerendered(TabContents* tab_contents); |
| 165 void MarkTabContentsAsNotPrerendered(TabContents* tab_contents); | 166 void MarkTabContentsAsNotPrerendered(TabContents* tab_contents); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 423 |
| 423 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 424 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 424 }; | 425 }; |
| 425 | 426 |
| 426 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 427 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
| 427 int render_process_id); | 428 int render_process_id); |
| 428 | 429 |
| 429 } // namespace prerender | 430 } // namespace prerender |
| 430 | 431 |
| 431 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 432 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |