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

Unified Diff: chrome/browser/prerender/prerender_contents.h

Issue 6685012: Give prerendering RVH's RenderWidgetHostViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 'queued' renamed to 'pending' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/prerender_contents.h
===================================================================
--- chrome/browser/prerender/prerender_contents.h (revision 82104)
+++ chrome/browser/prerender/prerender_contents.h (working copy)
@@ -20,10 +20,11 @@
#include "content/common/window_container_type.h"
#include "webkit/glue/window_open_disposition.h"
+class RenderViewHost;
class TabContents;
struct FaviconURL;
+struct ViewHostMsg_FrameNavigate_Params;
struct WebPreferences;
-struct ViewHostMsg_FrameNavigate_Params;
namespace base {
class ProcessMetrics;
@@ -66,7 +67,10 @@
static Factory* CreateFactory();
- virtual void StartPrerendering();
+ // |source_render_view_host| is the RenderViewHost that initiated
+ // prerendering. It must be non-NULL and have its own view. It is used
+ // solely to determine the window bounds while prerendering.
+ virtual void StartPrerendering(const RenderViewHost* source_render_view_host);
// Verifies that the prerendering is not using too many resources, and kills
// it if not.
@@ -100,6 +104,14 @@
void set_final_status(FinalStatus final_status);
FinalStatus final_status() const;
+ // Set instead of |final_status_| when it is not safe to immediately destroy
+ // the PrerenderContents. It is not guaranteed that the pending status will
+ // be the final FinalStatus if the PrerenderContents is cancelled for some
+ // other reason in the meantime, but it is guaranteed that once set, the RVH
+ // of the PrerenderContents will not be used.
+ void set_pending_final_status(FinalStatus pending_final_status);
+ FinalStatus pending_final_status() const;
+
base::TimeTicks load_start_time() const { return load_start_time_; }
// Indicates whether this prerendered page can be used for the provided
@@ -261,6 +273,7 @@
bool has_stopped_loading_;
FinalStatus final_status_;
+ FinalStatus pending_final_status_;
bool prerendering_has_started_;

Powered by Google App Engine
This is Rietveld 408576698