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

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 660083003: Fix support for multiple frames per SiteInstance in CreateProxiesForSiteInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // given RenderViewHost's process. 47 // given RenderViewHost's process.
48 bool ResetNodesForNewProcess(RenderViewHost* render_view_host, 48 bool ResetNodesForNewProcess(RenderViewHost* render_view_host,
49 FrameTreeNode* node) { 49 FrameTreeNode* node) {
50 if (render_view_host == node->current_frame_host()->render_view_host()) 50 if (render_view_host == node->current_frame_host()->render_view_host())
51 node->ResetForNewProcess(); 51 node->ResetForNewProcess();
52 return true; 52 return true;
53 } 53 }
54 54
55 bool CreateProxyForSiteInstance(const scoped_refptr<SiteInstance>& instance, 55 bool CreateProxyForSiteInstance(const scoped_refptr<SiteInstance>& instance,
56 FrameTreeNode* node) { 56 FrameTreeNode* node) {
57 node->render_manager()->CreateRenderFrameProxy(instance.get()); 57 // If a new frame is created in the current SiteInstance, other frames in
58 // that SiteInstance don't need a proxy for the new frame.
59 SiteInstance* current_instance =
60 node->render_manager()->current_frame_host()->GetSiteInstance();
61 if (current_instance != instance.get())
62 node->render_manager()->CreateRenderFrameProxy(instance.get());
58 return true; 63 return true;
59 } 64 }
60 65
61 } // namespace 66 } // namespace
62 67
63 FrameTree::FrameTree(Navigator* navigator, 68 FrameTree::FrameTree(Navigator* navigator,
64 RenderFrameHostDelegate* render_frame_delegate, 69 RenderFrameHostDelegate* render_frame_delegate,
65 RenderViewHostDelegate* render_view_delegate, 70 RenderViewHostDelegate* render_view_delegate,
66 RenderWidgetHostDelegate* render_widget_delegate, 71 RenderWidgetHostDelegate* render_widget_delegate,
67 RenderFrameHostManager::Delegate* manager_delegate) 72 RenderFrameHostManager::Delegate* manager_delegate)
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 rvh->Shutdown(); 345 rvh->Shutdown();
341 render_view_host_pending_shutdown_map_.erase(multi_iter); 346 render_view_host_pending_shutdown_map_.erase(multi_iter);
342 } 347 }
343 break; 348 break;
344 } 349 }
345 CHECK(render_view_host_found); 350 CHECK(render_view_host_found);
346 } 351 }
347 } 352 }
348 353
349 } // namespace content 354 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698