Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/browser/prerender/prerender_contents.h

Issue 7059019: Ensure that PageID's of prerendered pages do not exceed the Page ID of the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(TabContents* tc);
256 256
257 int32 starting_page_id() { return starting_page_id_; }
258
257 protected: 259 protected:
258 PrerenderContents(PrerenderManager* prerender_manager, 260 PrerenderContents(PrerenderManager* prerender_manager,
259 Profile* profile, 261 Profile* profile,
260 const GURL& url, 262 const GURL& url,
261 const GURL& referrer); 263 const GURL& referrer);
262 264
263 const GURL& prerender_url() const { return prerender_url_; } 265 const GURL& prerender_url() const { return prerender_url_; }
264 266
265 NotificationRegistrar& notification_registrar() { 267 NotificationRegistrar& notification_registrar() {
266 return notification_registrar_; 268 return notification_registrar_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 scoped_ptr<TabContentsWrapper> prerender_contents_; 352 scoped_ptr<TabContentsWrapper> prerender_contents_;
351 353
352 scoped_ptr<PrerenderRenderViewHostObserver> render_view_host_observer_; 354 scoped_ptr<PrerenderRenderViewHostObserver> render_view_host_observer_;
353 355
354 scoped_ptr<TabContentsDelegateImpl> tab_contents_delegate_; 356 scoped_ptr<TabContentsDelegateImpl> tab_contents_delegate_;
355 357
356 // These are -1 before a RenderView is created. 358 // These are -1 before a RenderView is created.
357 int child_id_; 359 int child_id_;
358 int route_id_; 360 int route_id_;
359 361
362 // Page ID at which prerendering started.
363 int32 starting_page_id_;
364
365 // Offset by which to offset prerendered pages
366 static const int32 kPrerenderPageIdOffset = 10;
367
360 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 368 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
361 }; 369 };
362 370
363 } // namespace prerender 371 } // namespace prerender
364 372
365 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 373 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698