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 d98c2de00541437bd0ac054aff8c88b340403e46..5602266464ff9bae4e0522d07ae4be4909b68341 100644 |
--- a/content/browser/web_contents/web_contents_impl.h |
+++ b/content/browser/web_contents/web_contents_impl.h |
@@ -486,6 +486,7 @@ class CONTENT_EXPORT WebContentsImpl |
std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( |
const GURL& url) override; |
void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) override; |
+ RenderFrameHost* GetFrameAtNode(FrameTreeNode* tree_node) override; |
void OnFocusedElementChangedInFrame( |
RenderFrameHostImpl* frame, |
const gfx::Rect& bounds_in_root_view) override; |
@@ -848,9 +849,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_; } |
@@ -861,13 +863,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. |
- 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. |