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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Controls if we launch or squash prefetch requests as they arrive from | 174 // Controls if we launch or squash prefetch requests as they arrive from |
175 // renderers. | 175 // renderers. |
176 static bool IsPrefetchEnabled(); | 176 static bool IsPrefetchEnabled(); |
177 static void SetIsPrefetchEnabled(bool enabled); | 177 static void SetIsPrefetchEnabled(bool enabled); |
178 | 178 |
179 static PrerenderManagerMode GetMode(); | 179 static PrerenderManagerMode GetMode(); |
180 static void SetMode(PrerenderManagerMode mode); | 180 static void SetMode(PrerenderManagerMode mode); |
181 static const char* GetModeString(); | 181 static const char* GetModeString(); |
182 static bool IsPrerenderingPossible(); | 182 static bool IsPrerenderingPossible(); |
183 static bool ActuallyPrerendering(); | 183 static bool ActuallyPrerendering(); |
184 static bool IsControlGroup(); | 184 static bool IsControlGroup(uint8 experiment_id); |
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(content::WebContents* web_contents, | 191 bool IsWebContentsPrerendering(content::WebContents* web_contents, |
192 Origin* origin) const; | 192 Origin* origin) const; |
193 | 193 |
194 // Returns the PrerenderContents object for the given web_contents if it's | 194 // Returns the PrerenderContents object for the given web_contents if it's |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 580 |
581 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 581 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
582 }; | 582 }; |
583 | 583 |
584 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 584 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
585 int render_process_id); | 585 int render_process_id); |
586 | 586 |
587 } // namespace prerender | 587 } // namespace prerender |
588 | 588 |
589 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 589 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |