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

Unified Diff: content/renderer/render_frame_impl.h

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 5c81cd15106424d41c551f690c26955112dfe835..183f7199d470c39c72333d248cb5ea8196ca6429 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -21,8 +21,14 @@ class CONTENT_EXPORT RenderFrameImpl
public:
// Creates a new RenderFrame. |render_view| is the RenderView object that this
// frame belongs to.
+ // Callers *must* call set_web_frame immediately after creation.
+ // TODO(creis): We should structure this so that set_web_frame isn't needed.
static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
+ // Look up the RenderFrameImpl for the given WebFrame.
+ // TODO(creis): I don't think we need this long term.
+ static RenderFrameImpl* FindByWebFrame(blink::WebFrame* web_frame);
+
// Used by content_layouttest_support to hook into the creation of
// RenderFrameImpls.
static void InstallCreateHook(
@@ -30,6 +36,15 @@ class CONTENT_EXPORT RenderFrameImpl
virtual ~RenderFrameImpl();
+ void set_web_frame(blink::WebFrame* web_frame) {
+ DCHECK(!frame_);
+ frame_ = web_frame;
+ }
+
+ bool is_swapped_out() const {
+ return is_swapped_out_;
+ }
+
// IPC::Sender
virtual bool Send(IPC::Message* msg) OVERRIDE;
@@ -187,6 +202,18 @@ class CONTENT_EXPORT RenderFrameImpl
private:
int GetRoutingID() const;
+ // IPC message handlers ------------------------------------------------------
+ //
+ // The documentation for these functions should be in
+ // content/common/*_messages.h for the message that the function is handling.
+
+ void OnSwapOut();
+
+ // TODO(creis): Make sure that WebFrame won't be deleted before we are.
+ // We need a sane way to act on our WebFrame when IPC messages are received.
+ // Currently, we expect set_web_frame to be called shortly after creation.
+ blink::WebFrame* frame_;
+
RenderViewImpl* render_view_;
int routing_id_;
bool is_swapped_out_;

Powered by Google App Engine
This is Rietveld 408576698