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

Unified Diff: content/renderer/render_frame_impl.h

Issue 138333006: Now that RenderFrame is 1:1 with WebFrame, add the associated getters and start cleaning up assumpt… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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/renderer/render_frame_impl.h
===================================================================
--- content/renderer/render_frame_impl.h (revision 244810)
+++ content/renderer/render_frame_impl.h (working copy)
@@ -50,12 +50,8 @@
// TODO(creis): We should structure this so that |SetWebFrame| isn't needed.
static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
- // For subframes, look up the RenderFrameImpl for the given WebFrame. Returns
- // NULL for main frames.
- // This only works when using --site-per-process, and returns NULL otherwise.
- // TODO(creis): Remove this when the RenderView methods dealing with frames
- // have moved to RenderFrame.
- static RenderFrameImpl* FindByWebFrame(blink::WebFrame* web_frame);
+ // Just like RenderFrame::FromWebFrame but returns the implementation.
+ static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
// Used by content_layouttest_support to hook into the creation of
// RenderFrameImpls.
@@ -80,12 +76,7 @@
// Returns the RenderWidget associated with this frame.
RenderWidget* GetRenderWidget();
- // Called by RenderView right after creating this object when the
- // blink::WebFrame has been created.
- void MainWebFrameCreated(blink::WebFrame* frame);
-
- // In --site-per-process mode, we keep track of which WebFrame this
- // RenderFrameImpl is for.
+ // This is called right after creation with the WebFrame for this RenderFrame.
void SetWebFrame(blink::WebFrame* web_frame);
#if defined(ENABLE_PLUGINS)
@@ -152,6 +143,7 @@
// RenderFrame implementation:
virtual RenderView* GetRenderView() OVERRIDE;
virtual int GetRoutingID() OVERRIDE;
+ virtual blink::WebFrame* GetWebFrame() OVERRIDE;
virtual WebPreferences& GetWebkitPreferences() OVERRIDE;
virtual int ShowContextMenu(ContextMenuClient* client,
const ContextMenuParams& params) OVERRIDE;
@@ -327,8 +319,7 @@
// content/common/*_messages.h for the message that the function is handling.
void OnSwapOut();
- // In --site-per-process mode, stores the WebFrame we are associated with.
- // NULL otherwise.
+ // Stores the WebFrame we are associated with.
blink::WebFrame* frame_;
RenderViewImpl* render_view_;

Powered by Google App Engine
This is Rietveld 408576698