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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Destroy all preloads for the given child route id pair and assign a final | 93 // Destroy all preloads for the given child route id pair and assign a final |
94 // status to them. | 94 // status to them. |
95 void DestroyPreloadForChildRouteIdPair( | 95 void DestroyPreloadForChildRouteIdPair( |
96 const std::pair<int, int>& child_route_id_pair, | 96 const std::pair<int, int>& child_route_id_pair, |
97 FinalStatus final_status); | 97 FinalStatus final_status); |
98 | 98 |
99 // For a given TabContents that wants to navigate to the URL supplied, | 99 // For a given TabContents that wants to navigate to the URL supplied, |
100 // determines whether a preloaded version of the URL can be used, | 100 // determines whether a preloaded version of the URL can be used, |
101 // and substitutes the prerendered RVH into the TabContents. Returns | 101 // and substitutes the prerendered RVH into the TabContents. Returns |
102 // whether or not a prerendered RVH could be used or not. | 102 // whether or not a prerendered RVH could be used or not. |
103 bool MaybeUsePreloadedPage(TabContents* tab_contents, const GURL& url); | 103 bool MaybeUsePreloadedPage(TabContents* tab_contents, |
104 bool MaybeUsePreloadedPageOld(TabContents* tab_contents, const GURL& url); | 104 const GURL& url, |
| 105 bool has_opener_set); |
| 106 bool MaybeUsePreloadedPageOld(TabContents* tab_contents, |
| 107 const GURL& url, |
| 108 bool has_opener_set); |
105 | 109 |
106 // Moves a PrerenderContents to the pending delete list from the list of | 110 // Moves a PrerenderContents to the pending delete list from the list of |
107 // active prerenders when prerendering should be cancelled. | 111 // active prerenders when prerendering should be cancelled. |
108 void MoveEntryToPendingDelete(PrerenderContents* entry); | 112 void MoveEntryToPendingDelete(PrerenderContents* entry); |
109 | 113 |
110 // Checks if the PrerenderContents has been added to the pending delete list. | 114 // Checks if the PrerenderContents has been added to the pending delete list. |
111 bool IsPendingDelete(PrerenderContents* entry) const; | 115 bool IsPendingDelete(PrerenderContents* entry) const; |
112 | 116 |
113 // Retrieves the PrerenderContents object for the specified URL, if it | 117 // Retrieves the PrerenderContents object for the specified URL, if it |
114 // has been prerendered. The caller will then have ownership of the | 118 // has been prerendered. The caller will then have ownership of the |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 base::TimeTicks last_prerender_start_time_; | 299 base::TimeTicks last_prerender_start_time_; |
296 | 300 |
297 std::list<TabContentsWrapper*> old_tab_contents_list_; | 301 std::list<TabContentsWrapper*> old_tab_contents_list_; |
298 | 302 |
299 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 303 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
300 }; | 304 }; |
301 | 305 |
302 } // namespace prerender | 306 } // namespace prerender |
303 | 307 |
304 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 308 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
OLD | NEW |