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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // Destroy()ed, but not yet deleted. | 260 // Destroy()ed, but not yet deleted. |
261 virtual PrerenderContents* GetPrerenderContentsForRoute( | 261 virtual PrerenderContents* GetPrerenderContentsForRoute( |
262 int child_id, int route_id) const; | 262 int child_id, int route_id) const; |
263 | 263 |
264 // Returns a list of all WebContents being prerendered. | 264 // Returns a list of all WebContents being prerendered. |
265 std::vector<content::WebContents*> GetAllPrerenderingContents() const; | 265 std::vector<content::WebContents*> GetAllPrerenderingContents() const; |
266 | 266 |
267 // Checks whether |url| has been recently navigated to. | 267 // Checks whether |url| has been recently navigated to. |
268 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); | 268 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); |
269 | 269 |
270 // Returns true iff the method given is valid for prerendering. | |
271 static bool IsValidHttpMethod(const std::string& method); | |
272 | |
273 // Returns true iff the scheme of the URL given is valid for prerendering. | 270 // Returns true iff the scheme of the URL given is valid for prerendering. |
274 static bool DoesURLHaveValidScheme(const GURL& url); | 271 static bool DoesURLHaveValidScheme(const GURL& url); |
275 | 272 |
276 // Returns true iff the scheme of the subresource URL given is valid for | 273 // Returns true iff the scheme of the subresource URL given is valid for |
277 // prerendering. | 274 // prerendering. |
278 static bool DoesSubresourceURLHaveValidScheme(const GURL& url); | 275 static bool DoesSubresourceURLHaveValidScheme(const GURL& url); |
279 | 276 |
280 // Returns a Value object containing the active pages being prerendered, and | 277 // Returns a Value object containing the active pages being prerendered, and |
281 // a history of pages which were prerendered. | 278 // a history of pages which were prerendered. |
282 std::unique_ptr<base::DictionaryValue> GetAsValue() const; | 279 std::unique_ptr<base::DictionaryValue> GetAsValue() const; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 PrerenderProcessSet prerender_process_hosts_; | 597 PrerenderProcessSet prerender_process_hosts_; |
601 | 598 |
602 base::WeakPtrFactory<PrerenderManager> weak_factory_; | 599 base::WeakPtrFactory<PrerenderManager> weak_factory_; |
603 | 600 |
604 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 601 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
605 }; | 602 }; |
606 | 603 |
607 } // namespace prerender | 604 } // namespace prerender |
608 | 605 |
609 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 606 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |