Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 1268153002: Refactor CreateOpenerProxies to support updates to frame openers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b58673e8aea3e94c123f585a6759d070878e8c75..3649b941b118f68a45f53ce91766e6bcdd65626f 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -618,6 +618,24 @@ class CONTENT_EXPORT RenderFrameHostManager {
// CreateOpenerProxies on it if it exists and returning otherwise.
void CreateOpenerProxiesIfNeeded(SiteInstance* instance);
+ // Traverse the opener chain and populate |opener_frame_trees| with
+ // all FrameTrees accessible by following frame openers of nodes in the
+ // given node's FrameTree. |opener_frame_trees| is ordered so that openers
+ // of smaller-indexed entries point to larger-indexed entries (i.e., this
+ // node's FrameTree is at index 0, its opener's FrameTree is at index 1,
+ // etc). If the traversal encounters a node with an opener pointing to a
+ // FrameTree that has already been traversed (such as when there's a cycle),
+ // the node is added to |nodes_with_back_links|.
+ void CollectOpenerFrameTrees(
+ std::vector<FrameTree*>* opener_frame_trees,
+ base::hash_set<FrameTreeNode*>* nodes_with_back_links);
+
+ // Create swapped out RenderViews and RenderFrameProxies in the given
+ // SiteInstance for the current node's FrameTree. Used as a helper function
+ // in CreateOpenerProxies for creating proxies in each FrameTree on the
+ // opener chain.
+ void CreateOpenerProxiesForFrameTree(SiteInstance* instance);
+
// Creates a RenderFrameHost and corresponding RenderViewHost if necessary.
scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance,
int view_routing_id,

Powered by Google App Engine
This is Rietveld 408576698