| 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( | |
| 185 const content::RenderViewHost* render_view_host) const; | |
| 186 | 184 |
| 187 // Checks whether |url| has been recently navigated to. | 185 // Checks whether |url| has been recently navigated to. |
| 188 bool HasRecentlyBeenNavigatedTo(const GURL& url); | 186 bool HasRecentlyBeenNavigatedTo(const GURL& url); |
| 189 | 187 |
| 190 // Returns true if the method given is invalid for prerendering. | 188 // Returns true if the method given is invalid for prerendering. |
| 191 static bool IsValidHttpMethod(const std::string& method); | 189 static bool IsValidHttpMethod(const std::string& method); |
| 192 | 190 |
| 193 // Returns a Value object containing the active pages being prerendered, and | 191 // Returns a Value object containing the active pages being prerendered, and |
| 194 // a history of pages which were prerendered. The caller is responsible for | 192 // a history of pages which were prerendered. The caller is responsible for |
| 195 // deleting the return value. | 193 // deleting the return value. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 457 |
| 460 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 458 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 461 }; | 459 }; |
| 462 | 460 |
| 463 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 461 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
| 464 int render_process_id); | 462 int render_process_id); |
| 465 | 463 |
| 466 } // namespace prerender | 464 } // namespace prerender |
| 467 | 465 |
| 468 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 466 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |