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

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

Issue 666563005: Set up Mojo connection when RenderFrameHost is reused for new RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 void FrameTree::RenderProcessGone(RenderViewHost* render_view_host) { 225 void FrameTree::RenderProcessGone(RenderViewHost* render_view_host) {
226 // Walk the full tree looking for nodes that may be affected. Once a frame 226 // Walk the full tree looking for nodes that may be affected. Once a frame
227 // crashes, all of its child FrameTreeNodes go away. 227 // crashes, all of its child FrameTreeNodes go away.
228 // Note that the helper function may call ResetForNewProcess on a node, which 228 // Note that the helper function may call ResetForNewProcess on a node, which
229 // clears its children before we iterate over them. That's ok, because 229 // clears its children before we iterate over them. That's ok, because
230 // ForEach does not add a node's children to the queue until after visiting 230 // ForEach does not add a node's children to the queue until after visiting
231 // the node itself. 231 // the node itself.
232 ForEach(base::Bind(&ResetNodesForNewProcess, render_view_host)); 232 ForEach(base::Bind(&ResetNodesForNewProcess, render_view_host));
233
234 // Ensure that if the main frame is reused for a new RenderFrame, it will
235 // set up the Mojo connection with that frame.
236 GetMainFrame()->InvalidateMojoConnection();
Charlie Reis 2014/10/23 18:38:31 I don't think we want to do this on the main frame
blundell 2014/10/24 14:42:54 Done.
233 } 237 }
234 238
235 RenderFrameHostImpl* FrameTree::GetMainFrame() const { 239 RenderFrameHostImpl* FrameTree::GetMainFrame() const {
236 return root_->current_frame_host(); 240 return root_->current_frame_host();
237 } 241 }
238 242
239 FrameTreeNode* FrameTree::GetFocusedFrame() { 243 FrameTreeNode* FrameTree::GetFocusedFrame() {
240 return FindByID(focused_frame_tree_node_id_); 244 return FindByID(focused_frame_tree_node_id_);
241 } 245 }
242 246
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 rvh->Shutdown(); 349 rvh->Shutdown();
346 render_view_host_pending_shutdown_map_.erase(multi_iter); 350 render_view_host_pending_shutdown_map_.erase(multi_iter);
347 } 351 }
348 break; 352 break;
349 } 353 }
350 CHECK(render_view_host_found); 354 CHECK(render_view_host_found);
351 } 355 }
352 } 356 }
353 357
354 } // namespace content 358 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698