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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 616133002: Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-applying same patch Created 5 years, 11 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: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index c1c053c9820b589c5e516491914feabeac7b1ce6..a6debc3656812b25b2941f658bcaf253676fd3dc 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -191,6 +191,18 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// menus, and other times when the renderer initiates creating an object.
virtual void Init();
+ // Initializes a RenderWidgetHost that is attached to a RenderFrameHost.
+ void InitForFrame();
+
+ // Signal whether this RenderWidgetHost is owned by a RenderFrameHost, in
+ // which case it does not do self-deletion.
+ void set_owned_by_render_frame_host(bool owned_by_rfh) {
+ owned_by_render_frame_host_ = owned_by_rfh;
+ }
+
+ // Called by RenderFrameHost before destroying this object.
+ void Cleanup();
+
// Tells the renderer to die and then calls Destroy().
virtual void Shutdown();
@@ -828,6 +840,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl
base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
PendingSnapshotMap pending_browser_snapshots_;
+ // Indicates whether a RenderFramehost has ownership, in which case this
+ // object does not self destroy.
+ bool owned_by_render_frame_host_;
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);

Powered by Google App Engine
This is Rietveld 408576698