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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // Destroy()ed, but not yet deleted. | 252 // Destroy()ed, but not yet deleted. |
253 virtual PrerenderContents* GetPrerenderContentsForRoute( | 253 virtual PrerenderContents* GetPrerenderContentsForRoute( |
254 int child_id, int route_id) const; | 254 int child_id, int route_id) const; |
255 | 255 |
256 // Returns a list of all WebContents being prerendered. | 256 // Returns a list of all WebContents being prerendered. |
257 std::vector<content::WebContents*> GetAllPrerenderingContents() const; | 257 std::vector<content::WebContents*> GetAllPrerenderingContents() const; |
258 | 258 |
259 // Checks whether |url| has been recently navigated to. | 259 // Checks whether |url| has been recently navigated to. |
260 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); | 260 bool HasRecentlyBeenNavigatedTo(Origin origin, const GURL& url); |
261 | 261 |
262 // Returns true iff the method given is valid for prerendering. | |
263 static bool IsValidHttpMethod(const std::string& method); | |
264 | |
265 // Returns true iff the scheme of the URL given is valid for prerendering. | 262 // Returns true iff the scheme of the URL given is valid for prerendering. |
266 static bool DoesURLHaveValidScheme(const GURL& url); | 263 static bool DoesURLHaveValidScheme(const GURL& url); |
267 | 264 |
268 // Returns true iff the scheme of the subresource URL given is valid for | 265 // Returns true iff the scheme of the subresource URL given is valid for |
269 // prerendering. | 266 // prerendering. |
270 static bool DoesSubresourceURLHaveValidScheme(const GURL& url); | 267 static bool DoesSubresourceURLHaveValidScheme(const GURL& url); |
271 | 268 |
272 // Returns a Value object containing the active pages being prerendered, and | 269 // Returns a Value object containing the active pages being prerendered, and |
273 // a history of pages which were prerendered. | 270 // a history of pages which were prerendered. |
274 std::unique_ptr<base::DictionaryValue> GetAsValue() const; | 271 std::unique_ptr<base::DictionaryValue> GetAsValue() const; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 PrerenderProcessSet prerender_process_hosts_; | 585 PrerenderProcessSet prerender_process_hosts_; |
589 | 586 |
590 base::WeakPtrFactory<PrerenderManager> weak_factory_; | 587 base::WeakPtrFactory<PrerenderManager> weak_factory_; |
591 | 588 |
592 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 589 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
593 }; | 590 }; |
594 | 591 |
595 } // namespace prerender | 592 } // namespace prerender |
596 | 593 |
597 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 594 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |