Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager.h |
| diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h |
| index 6a5bc8bcd97a53dfb9a67be068833326ac40ea64..1afb6332b27fe028e0011cd4006a4a8961b56ac5 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.h |
| +++ b/content/browser/frame_host/render_frame_host_manager.h |
| @@ -171,6 +171,12 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
| // hidden state. |
| virtual bool IsHidden() = 0; |
| + // If the delegate is an inner WebContents, this method returns the |
| + // FrameTreeNode ID of the frame in the outer WebContents which hosts |
| + // the inner WebContents. Returns FrameTreeNode::kFrameTreeNodeInvalidID |
| + // if the delegate does not have an outer WebContents. |
| + virtual int GetOuterDelegateFrameTreeNodeID() = 0; |
| + |
| protected: |
| virtual ~Delegate() {} |
| }; |
| @@ -216,8 +222,29 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
| // there is no current one. |
| RenderWidgetHostView* GetRenderWidgetHostView() const; |
| + // Returns whether this manager belongs to a FrameTreeNode that is a main |
| + // frame in an inner WebContents. |
| + // TODO(lazyboy): Make this work correctly for subframes inside inner |
| + // WebContents too. |
| + bool ForInnerDelegate(); |
| + |
| + // Returns the RenderWidgetHost of the outer WebContents (if any) that can be |
| + // used to fetch the last keyboard event. |
| + // TODO(lazyboy): This can be removed once input events are sent directly to |
| + // remote frames. |
| + RenderWidgetHostImpl* GetOuterRenderWidgetHostForKeyboardInput(); |
| + |
| RenderFrameProxyHost* GetProxyToParent(); |
| + // Returns the proxy to inner WebContents in the outer WebContents's |
| + // SiteInstance. Returns nullptr if this WebContents isn't part of inner/outer |
| + // relationship. |
| + RenderFrameProxyHost* GetProxyToOuterDelegate(); |
| + |
| + // Removes the FrameTreeNode in the outer WebContents that represents this |
| + // FrameTreeNode. |
| + void RemoveOuterDelegateFrame(); |
| + |
| // Returns the pending RenderFrameHost, or NULL if there is no pending one. |
| RenderFrameHostImpl* pending_frame_host() const { |
| return pending_render_frame_host_.get(); |
| @@ -426,6 +453,18 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
| // TODO(alexmos): Switch this to return RenderFrame routing IDs. |
| int CreateOpenerProxies(SiteInstance* instance); |
| + // Called on the RFHM of the inner WebContents to create a |
| + // RenderFrameProxyHost in its outer WebContents's SiteInstance, |
| + // |outer_contents_site_instance|. The frame in outer WebContents that is |
| + // hosting the inner WebContents is |render_frame_host|, and the frame will |
| + // be swapped out by the proxy. |
|
nasko
2015/06/23 13:39:23
nit: s/out/with/
lazyboy
2015/06/23 23:00:00
Done.
|
| + void CreateOuterDelegateProxy(SiteInstance* outer_contents_site_instance, |
| + RenderFrameHostImpl* render_frame_host); |
| + |
| + // Sets the child RenderWidgetHostView for this frame, which must be part of |
| + // an inner WebContents. |
| + void SetRWHViewForInnerContents(RenderWidgetHostView* child_rwhv); |
| + |
| private: |
| friend class FrameTreeVisualizer; |
| friend class NavigatorTestWithBrowserSideNavigation; |