| 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 645b6c7408ed7b6b940cf0b0a7577a276a0b4937..429b0192173d62d7e269768204f69cd7e00ef2fd 100644
|
| --- a/content/browser/web_contents/web_contents_impl.h
|
| +++ b/content/browser/web_contents/web_contents_impl.h
|
| @@ -463,6 +463,7 @@ class CONTENT_EXPORT WebContentsImpl
|
| void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) override;
|
| std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
|
| const GURL& url) override;
|
| + void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) override;
|
|
|
| // RenderViewHostDelegate ----------------------------------------------------
|
| RenderViewHostDelegateView* GetDelegateView() override;
|
| @@ -810,26 +811,36 @@ private:
|
| // corresponding FrameTreeNode.
|
| struct WebContentsTreeNode {
|
| public:
|
| - WebContentsTreeNode();
|
| + explicit WebContentsTreeNode(WebContentsImpl* web_contents);
|
| ~WebContentsTreeNode();
|
|
|
| - typedef std::set<WebContentsTreeNode*> ChildrenSet;
|
| + typedef std::unordered_map<int, WebContentsTreeNode*> ChildrenMap;
|
|
|
| void ConnectToOuterWebContents(WebContentsImpl* outer_web_contents,
|
| RenderFrameHostImpl* outer_contents_frame);
|
|
|
| WebContentsImpl* outer_web_contents() { return outer_web_contents_; }
|
| - int outer_contents_frame_tree_node_id() {
|
| + int outer_contents_frame_tree_node_id() const {
|
| return outer_contents_frame_tree_node_id_;
|
| }
|
|
|
| + WebContentsImpl* FindInnerWebContentsAtFrame(const FrameTreeNode* node) {
|
| + return const_cast<WebContentsImpl*>(
|
| + static_cast<const WebContentsTreeNode*>(this)
|
| + ->FindInnerWebContentsAtFrame(node));
|
| + }
|
| + const WebContentsImpl* FindInnerWebContentsAtFrame(
|
| + const FrameTreeNode* node) const;
|
| +
|
| private:
|
| - // The outer WebContents.
|
| + // The WebContents that owns this node.
|
| + WebContentsImpl* const web_contents_;
|
| + // 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_;
|
| };
|
|
|
| // See WebContents::Create for a description of these parameters.
|
| @@ -969,6 +980,12 @@ private:
|
| // up at the next animation step if the throbber is going.
|
| void SetNotWaitingForResponse() { waiting_for_response_ = false; }
|
|
|
| + // Called by SetFocusedFrame. Split from SetFocusedFrame to prevent mutual
|
| + // recursion from inner to outer web contents.
|
| + void SetFocusedFrameInternal(FrameTreeNode* node,
|
| + SiteInstance* source,
|
| + bool can_visit_outer_contents);
|
| +
|
| // Navigation helpers --------------------------------------------------------
|
| //
|
| // These functions are helpers for Navigate() and DidNavigate().
|
|
|