Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |