Index: content/browser/web_contents/web_contents_impl.h |
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h |
index 813e35e1609baa118fafdf72d67af3deb7886fca..a2b8b7b9e5c810897f2664921517bdc86dd98d1f 100644 |
--- a/content/browser/web_contents/web_contents_impl.h |
+++ b/content/browser/web_contents/web_contents_impl.h |
@@ -492,6 +492,7 @@ class CONTENT_EXPORT WebContentsImpl |
std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( |
const GURL& url) override; |
void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) override; |
+ RenderFrameHost* GetFocusedFrameIncludingInnerWebContents() override; |
void OnFocusedElementChangedInFrame( |
RenderFrameHostImpl* frame, |
const gfx::Rect& bounds_in_root_view) override; |
@@ -854,9 +855,10 @@ class CONTENT_EXPORT WebContentsImpl |
WebContentsTreeNode(); |
~WebContentsTreeNode(); |
- typedef std::set<WebContentsTreeNode*> ChildrenSet; |
+ typedef std::map<int, WebContentsImpl*> ChildrenMap; |
- void ConnectToOuterWebContents(WebContentsImpl* outer_web_contents, |
+ void ConnectToOuterWebContents(WebContentsImpl* web_contents, |
+ WebContentsImpl* outer_web_contents, |
RenderFrameHostImpl* outer_contents_frame); |
WebContentsImpl* outer_web_contents() { return outer_web_contents_; } |
@@ -867,13 +869,18 @@ class CONTENT_EXPORT WebContentsImpl |
WebContentsImpl* focused_web_contents() { return focused_web_contents_; } |
void SetFocusedWebContents(WebContentsImpl* web_contents); |
+ // Returns the WebContents at a tree node in the frame tree or nullptr if |
+ // there is none. |
+ WebContentsImpl* FindInnerWebContentsAtNode(FrameTreeNode* node); |
+ |
private: |
// The outer WebContents. |
WebContentsImpl* outer_web_contents_; |
// The ID of the FrameTreeNode in outer WebContents that is hosting us. |
int outer_contents_frame_tree_node_id_; |
- // List of inner WebContents that we host. |
- ChildrenSet inner_web_contents_tree_nodes_; |
+ // List of inner WebContents that we host. Is is indexed by FrameTreeNode |
alexmos
2017/03/03 20:07:57
nit: s/Is is/It is/
avallee
2017/06/21 02:25:35
reverted.
|
+ // id. |
+ ChildrenMap inner_web_contents_tree_nodes_; |
// Only the root node should have this set. This indicates the WebContents |
// whose frame tree has the focused frame. The WebContents tree could be |
// arbitrarily deep. |
@@ -1071,6 +1078,10 @@ class CONTENT_EXPORT WebContentsImpl |
// Returns the root of the WebContents tree. |
WebContentsImpl* GetOutermostWebContents(); |
+ // Walks up to the outermost WebContents and focuses the frame tree node where |
alexmos
2017/03/03 20:07:57
nit: s/frame tree node/FrameTreeNode/. Also, clar
avallee
2017/06/21 02:25:35
Done.
|
+ // the current WebContents is attached. |
+ void FocusOuterAttachmentFrameChain(); |
+ |
// Navigation helpers -------------------------------------------------------- |
// |
// These functions are helpers for Navigate() and DidNavigate(). |