| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Indicates whether to use the legacy code doing prerendering via | 245 // Indicates whether to use the legacy code doing prerendering via |
| 246 // a RenderViewHost (false), or whether the new TabContents based prerendering | 246 // a RenderViewHost (false), or whether the new TabContents based prerendering |
| 247 // is to be used (true). | 247 // is to be used (true). |
| 248 // TODO(cbentzel): Remove once new approach looks stable. | 248 // TODO(cbentzel): Remove once new approach looks stable. |
| 249 static bool UseTabContents() { | 249 static bool UseTabContents() { |
| 250 return true; | 250 return true; |
| 251 } | 251 } |
| 252 | 252 |
| 253 // Applies all the URL history encountered during prerendering to the | 253 // Applies all the URL history encountered during prerendering to the |
| 254 // new tab. | 254 // new tab. |
| 255 void CommitHistory(TabContents* tc); | 255 void CommitHistory(TabContentsWrapper* tab); |
| 256 | 256 |
| 257 int32 starting_page_id() { return starting_page_id_; } | 257 int32 starting_page_id() { return starting_page_id_; } |
| 258 | 258 |
| 259 protected: | 259 protected: |
| 260 PrerenderContents(PrerenderManager* prerender_manager, | 260 PrerenderContents(PrerenderManager* prerender_manager, |
| 261 Profile* profile, | 261 Profile* profile, |
| 262 const GURL& url, | 262 const GURL& url, |
| 263 const GURL& referrer); | 263 const GURL& referrer); |
| 264 | 264 |
| 265 const GURL& prerender_url() const { return prerender_url_; } | 265 const GURL& prerender_url() const { return prerender_url_; } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 // Offset by which to offset prerendered pages | 369 // Offset by which to offset prerendered pages |
| 370 static const int32 kPrerenderPageIdOffset = 10; | 370 static const int32 kPrerenderPageIdOffset = 10; |
| 371 | 371 |
| 372 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 372 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
| 373 }; | 373 }; |
| 374 | 374 |
| 375 } // namespace prerender | 375 } // namespace prerender |
| 376 | 376 |
| 377 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 377 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
| OLD | NEW |