| Index: content/browser/frame_host/render_frame_host_impl.h
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
|
| index 341651a0c1cd9b76e4a8f77252335f6739ca3989..122bb6f4368e565a3c070badf8b98cf1151e643b 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.h
|
| +++ b/content/browser/frame_host/render_frame_host_impl.h
|
| @@ -53,6 +53,7 @@ class RenderFrameHostDelegate;
|
| class RenderFrameProxyHost;
|
| class RenderProcessHost;
|
| class RenderViewHostImpl;
|
| +class RenderWidgetHostDelegate;
|
| class RenderWidgetHostImpl;
|
| class TimeoutMonitor;
|
| struct ContextMenuParams;
|
| @@ -61,6 +62,21 @@ struct Referrer;
|
| struct ShowDesktopNotificationHostMsgParams;
|
| struct TransitionLayerData;
|
|
|
| +// Flag arguments for RenderFrameHost creation.
|
| +enum CreateRenderFrameFlags {
|
| + // The RFH will be initially placed on the swapped out hosts list.
|
| + SWAPPED_OUT = 1 << 0,
|
| + // The new RenderFrame is being created for a navigation of the
|
| + // top-level frame.
|
| + FOR_MAIN_FRAME_NAVIGATION = 1 << 1,
|
| + // The RenderFrame is initially hidden.
|
| + HIDDEN = 1 << 2,
|
| + // The RenderFrameHost will have a new RenderWidgetHost created and
|
| + // attached to it. This is used when the RenderFrameHost is the root
|
| + // of a subtree of frames that are being rendered in the same process.
|
| + CREATE_RENDER_WIDGET_HOST = 1 << 3
|
| +};
|
| +
|
| class CONTENT_EXPORT RenderFrameHostImpl
|
| : public RenderFrameHost,
|
| public BrowserAccessibilityDelegate {
|
| @@ -167,8 +183,14 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| RenderViewHostImpl* render_view_host() { return render_view_host_; }
|
| RenderFrameHostDelegate* delegate() { return delegate_; }
|
| FrameTreeNode* frame_tree_node() { return frame_tree_node_; }
|
| - // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in
|
| - // the future, so update this accessor to return the right pointer.
|
| +
|
| + // This is called to create RenderWidgetHosts for out-of-process iframes.
|
| + void CreateRenderWidgetHost(RenderWidgetHostDelegate* delegate,
|
| + bool hidden);
|
| +
|
| + // This returns the RenderFrameHost's owned RenderWidgetHost if it has one,
|
| + // or else it returns a pointer to the RenderViewHost (which inherits
|
| + // RenderWidgetHost).
|
| RenderWidgetHostImpl* GetRenderWidgetHost();
|
|
|
| // This function is called when this is a swapped out RenderFrameHost that
|
| @@ -352,10 +374,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| // into WebContentsObserver::FrameDetached for now.
|
| RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
|
| RenderFrameHostDelegate* delegate,
|
| + RenderWidgetHostDelegate* rwh_delegate,
|
| FrameTree* frame_tree,
|
| FrameTreeNode* frame_tree_node,
|
| int routing_id,
|
| - bool is_swapped_out);
|
| + int flags);
|
|
|
| private:
|
| friend class TestRenderFrameHost;
|
| @@ -492,6 +515,13 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| // Map from notification_id to a callback to cancel them.
|
| std::map<int, base::Closure> cancel_notification_callbacks_;
|
|
|
| + // RenderFrameHosts that need management of the rendering and input events
|
| + // for their frame subtrees require RenderWidgetHosts. This typically
|
| + // means frames that are rendered in different processes from their parent
|
| + // frames.
|
| + // TODO(kenrb): Later this will also be used on the top-level frame.
|
| + scoped_ptr<RenderWidgetHostImpl> render_widget_host_;
|
| +
|
| int routing_id_;
|
|
|
| // The current state of this RenderFrameHost.
|
|
|