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_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 virtual void Observe(int type, | 147 virtual void Observe(int type, |
148 const content::NotificationSource& source, | 148 const content::NotificationSource& source, |
149 const content::NotificationDetails& details) OVERRIDE; | 149 const content::NotificationDetails& details) OVERRIDE; |
150 | 150 |
151 // Adds an alias URL, for one of the many redirections. If the URL can not | 151 // Adds an alias URL, for one of the many redirections. If the URL can not |
152 // be prerendered - for example, it's an ftp URL - |this| will be destroyed | 152 // be prerendered - for example, it's an ftp URL - |this| will be destroyed |
153 // and false is returned. Otherwise, true is returned and the alias is | 153 // and false is returned. Otherwise, true is returned and the alias is |
154 // remembered. | 154 // remembered. |
155 virtual bool AddAliasURL(const GURL& url); | 155 virtual bool AddAliasURL(const GURL& url); |
156 | 156 |
157 // Adds all alias URLs from another prerender. | |
158 void AddAliasURLsFromOtherPrerenderContents(PrerenderContents* other_pc); | |
cbentzel
2011/11/16 21:28:56
Nit: Could be a const PrerenderContents& in this c
| |
159 | |
157 // The preview TabContents (may be null). | 160 // The preview TabContents (may be null). |
158 TabContentsWrapper* prerender_contents() const { | 161 TabContentsWrapper* prerender_contents() const { |
159 return prerender_contents_.get(); | 162 return prerender_contents_.get(); |
160 } | 163 } |
161 | 164 |
162 TabContentsWrapper* ReleasePrerenderContents(); | 165 TabContentsWrapper* ReleasePrerenderContents(); |
163 | 166 |
164 // Sets the final status, calls OnDestroy and adds |this| to the | 167 // Sets the final status, calls OnDestroy and adds |this| to the |
165 // PrerenderManager's pending deletes list. | 168 // PrerenderManager's pending deletes list. |
166 void Destroy(FinalStatus reason); | 169 void Destroy(FinalStatus reason); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 | 311 |
309 // Offset by which to offset prerendered pages | 312 // Offset by which to offset prerendered pages |
310 static const int32 kPrerenderPageIdOffset = 10; | 313 static const int32 kPrerenderPageIdOffset = 10; |
311 | 314 |
312 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 315 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
313 }; | 316 }; |
314 | 317 |
315 } // namespace prerender | 318 } // namespace prerender |
316 | 319 |
317 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 320 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
OLD | NEW |