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

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: Misc fixes Created 7 years 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
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 6ac984cb6b6d6926d85a6e584f11fd57d76463d9..3f872938a158c9122f09f2aa7c638d2cc6c1c274 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -46,8 +46,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(
@@ -55,6 +61,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_;
+ }
+
// TODO(jam): this is a temporary getter until all the code is transitioned
// to using RenderFrame instead of RenderView.
RenderViewImpl* render_view() { return render_view_; }
@@ -325,6 +340,18 @@ class CONTENT_EXPORT RenderFrameImpl
void AddObserver(RenderFrameObserver* observer);
void RemoveObserver(RenderFrameObserver* observer);
+ // 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_;
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698