| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 10 #include <map> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Destroy all preloads for the given child route id pair and assign a final | 85 // Destroy all preloads for the given child route id pair and assign a final |
| 86 // status to them. | 86 // status to them. |
| 87 virtual void DestroyPreloadForChildRouteIdPair( | 87 virtual void DestroyPreloadForChildRouteIdPair( |
| 88 const std::pair<int, int>& child_route_id_pair, | 88 const std::pair<int, int>& child_route_id_pair, |
| 89 FinalStatus final_status); | 89 FinalStatus final_status); |
| 90 | 90 |
| 91 // For a given TabContents that wants to navigate to the URL supplied, | 91 // For a given TabContents that wants to navigate to the URL supplied, |
| 92 // determines whether a preloaded version of the URL can be used, | 92 // determines whether a preloaded version of the URL can be used, |
| 93 // and substitutes the prerendered RVH into the TabContents. Returns | 93 // and substitutes the prerendered RVH into the TabContents. Returns |
| 94 // whether or not a prerendered RVH could be used or not. | 94 // whether or not a prerendered RVH could be used or not. |
| 95 bool MaybeUsePreloadedPage(TabContents* tab_contents, const GURL& url); | 95 bool MaybeUsePreloadedPage(TabContents* tab_contents, |
| 96 bool MaybeUsePreloadedPageOld(TabContents* tab_contents, const GURL& url); | 96 const GURL& url, |
| 97 bool has_opener_set); |
| 98 bool MaybeUsePreloadedPageOld(TabContents* tab_contents, |
| 99 const GURL& url, |
| 100 bool has_opener_set); |
| 97 | 101 |
| 98 // Moves a PrerenderContents to the pending delete list from the list of | 102 // Moves a PrerenderContents to the pending delete list from the list of |
| 99 // active prerenders when prerendering should be cancelled. | 103 // active prerenders when prerendering should be cancelled. |
| 100 void MoveEntryToPendingDelete(PrerenderContents* entry); | 104 void MoveEntryToPendingDelete(PrerenderContents* entry); |
| 101 | 105 |
| 102 // Checks if the PrerenderContents has been added to the pending delete list. | 106 // Checks if the PrerenderContents has been added to the pending delete list. |
| 103 bool IsPendingDelete(PrerenderContents* entry) const; | 107 bool IsPendingDelete(PrerenderContents* entry) const; |
| 104 | 108 |
| 105 // Retrieves the PrerenderContents object for the specified URL, if it | 109 // Retrieves the PrerenderContents object for the specified URL, if it |
| 106 // has been prerendered. The caller will then have ownership of the | 110 // has been prerendered. The caller will then have ownership of the |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 320 |
| 317 // Cancels pending tasks on deletion. | 321 // Cancels pending tasks on deletion. |
| 318 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_; | 322 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_; |
| 319 | 323 |
| 320 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 324 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 321 }; | 325 }; |
| 322 | 326 |
| 323 } // namespace prerender | 327 } // namespace prerender |
| 324 | 328 |
| 325 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 329 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |