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

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

Issue 10918189: Add PrerenderStatusEvent on Prerenders (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase to trunk, remove some unrelated fixes... Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // |is_control_group| is true, this will go through some of the mechanics of 110 // |is_control_group| is true, this will go through some of the mechanics of
111 // starting a prerender, without actually creating the RenderView. 111 // starting a prerender, without actually creating the RenderView.
112 // |creator_child_id| is the id of the child process that caused the prerender 112 // |creator_child_id| is the id of the child process that caused the prerender
113 // to be created, and is needed so that the prerendered URLs can be sent to it 113 // to be created, and is needed so that the prerendered URLs can be sent to it
114 // so render-initiated navigations will swap in the prerendered page. |size| 114 // so render-initiated navigations will swap in the prerendered page. |size|
115 // indicates the rectangular dimensions that the prerendered page should be. 115 // indicates the rectangular dimensions that the prerendered page should be.
116 // |session_storage_namespace| indicates the namespace that the prerendered 116 // |session_storage_namespace| indicates the namespace that the prerendered
117 // page should be part of. 117 // page should be part of.
118 virtual void StartPrerendering( 118 virtual void StartPrerendering(
119 int creator_child_id, 119 int creator_child_id,
120 int prerender_id,
120 const gfx::Size& size, 121 const gfx::Size& size,
121 content::SessionStorageNamespace* session_storage_namespace, 122 content::SessionStorageNamespace* session_storage_namespace,
122 bool is_control_group); 123 bool is_control_group);
123 124
124 // Verifies that the prerendering is not using too many resources, and kills 125 // Verifies that the prerendering is not using too many resources, and kills
125 // it if not. 126 // it if not.
126 void DestroyWhenUsingTooManyResources(); 127 void DestroyWhenUsingTooManyResources();
127 128
128 content::RenderViewHost* GetRenderViewHostMutable(); 129 content::RenderViewHost* GetRenderViewHostMutable();
129 const content::RenderViewHost* GetRenderViewHost() const; 130 const content::RenderViewHost* GetRenderViewHost() const;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 388
388 // Experiment during which this prerender is performed. 389 // Experiment during which this prerender is performed.
389 uint8 experiment_id_; 390 uint8 experiment_id_;
390 391
391 // List of all pages the prerendered page has tried to prerender. 392 // List of all pages the prerendered page has tried to prerender.
392 std::vector<PendingPrerenderInfo> pending_prerenders_; 393 std::vector<PendingPrerenderInfo> pending_prerenders_;
393 394
394 // The process that created the child id. 395 // The process that created the child id.
395 int creator_child_id_; 396 int creator_child_id_;
396 397
398 // The prerender id from the launcher.
399 int prerender_id_;
400
397 // The size of the WebView from the launching page. 401 // The size of the WebView from the launching page.
398 gfx::Size size_; 402 gfx::Size size_;
399 403
400 typedef std::vector<history::HistoryAddPageArgs> AddPageVector; 404 typedef std::vector<history::HistoryAddPageArgs> AddPageVector;
401 405
402 // Caches pages to be added to the history. 406 // Caches pages to be added to the history.
403 AddPageVector add_page_vector_; 407 AddPageVector add_page_vector_;
404 408
405 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 409 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
406 }; 410 };
407 411
408 } // namespace prerender 412 } // namespace prerender
409 413
410 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 414 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698