| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // finished loading. Only valid if called before MaybeUsePrerenderedPage. | 174 // finished loading. Only valid if called before MaybeUsePrerenderedPage. |
| 175 bool DidPrerenderFinishLoading(const GURL& url) const; | 175 bool DidPrerenderFinishLoading(const GURL& url) const; |
| 176 | 176 |
| 177 // Maintaining and querying the set of WebContents belonging to this | 177 // Maintaining and querying the set of WebContents belonging to this |
| 178 // PrerenderManager that are currently showing prerendered pages. | 178 // PrerenderManager that are currently showing prerendered pages. |
| 179 void MarkWebContentsAsPrerendered(content::WebContents* web_contents); | 179 void MarkWebContentsAsPrerendered(content::WebContents* web_contents); |
| 180 void MarkWebContentsAsWouldBePrerendered(content::WebContents* web_contents); | 180 void MarkWebContentsAsWouldBePrerendered(content::WebContents* web_contents); |
| 181 void MarkWebContentsAsNotPrerendered(content::WebContents* web_contents); | 181 void MarkWebContentsAsNotPrerendered(content::WebContents* web_contents); |
| 182 bool IsWebContentsPrerendered(content::WebContents* web_contents) const; | 182 bool IsWebContentsPrerendered(content::WebContents* web_contents) const; |
| 183 bool WouldWebContentsBePrerendered(content::WebContents* web_contents) const; | 183 bool WouldWebContentsBePrerendered(content::WebContents* web_contents) const; |
| 184 bool IsOldRenderViewHost(const RenderViewHost* render_view_host) const; | 184 bool IsOldRenderViewHost( |
| 185 const content::RenderViewHost* render_view_host) const; |
| 185 | 186 |
| 186 // Checks whether navigation to the provided URL has occurred in a visible | 187 // Checks whether navigation to the provided URL has occurred in a visible |
| 187 // tab recently. | 188 // tab recently. |
| 188 bool HasRecentlyBeenNavigatedTo(const GURL& url); | 189 bool HasRecentlyBeenNavigatedTo(const GURL& url); |
| 189 | 190 |
| 190 // Returns true if the method given is invalid for prerendering. | 191 // Returns true if the method given is invalid for prerendering. |
| 191 static bool IsValidHttpMethod(const std::string& method); | 192 static bool IsValidHttpMethod(const std::string& method); |
| 192 | 193 |
| 193 // Returns a Value object containing the active pages being prerendered, and | 194 // Returns a Value object containing the active pages being prerendered, and |
| 194 // a history of pages which were prerendered. The caller is responsible for | 195 // a history of pages which were prerendered. The caller is responsible for |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 454 |
| 454 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 455 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 455 }; | 456 }; |
| 456 | 457 |
| 457 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 458 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
| 458 int render_process_id); | 459 int render_process_id); |
| 459 | 460 |
| 460 } // namespace prerender | 461 } // namespace prerender |
| 461 | 462 |
| 462 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 463 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |