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 c325f5addd8c350093a74483218449653548a498..33d05680e053e4d0bcabb0913a340de1da947b72 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; |
@@ -856,9 +857,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_; } |
@@ -869,13 +871,17 @@ 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* find_contents_at_node(int frame_tree_node_id); |
+ |
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. |
alexmos
2017/02/23 20:07:05
Mention that this is now indexed by FrameTreeNode
avallee
2017/02/28 20:13:01
Done.
|
- ChildrenSet inner_web_contents_tree_nodes_; |
+ 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. |
@@ -1073,6 +1079,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 |
+ // the current WebContents is attached. |
+ void FocusOuterAttachmentFrameChain(); |
+ |
// Navigation helpers -------------------------------------------------------- |
// |
// These functions are helpers for Navigate() and DidNavigate(). |