OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 WasResized(); | 1424 WasResized(); |
1425 delegate_->RenderViewReady(this); | 1425 delegate_->RenderViewReady(this); |
1426 } | 1426 } |
1427 | 1427 |
1428 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { | 1428 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { |
1429 // Keep the termination status so we can get at it later when we | 1429 // Keep the termination status so we can get at it later when we |
1430 // need to know why it died. | 1430 // need to know why it died. |
1431 render_view_termination_status_ = | 1431 render_view_termination_status_ = |
1432 static_cast<base::TerminationStatus>(status); | 1432 static_cast<base::TerminationStatus>(status); |
1433 | 1433 |
1434 // Reset frame tree state associated with this process. | 1434 // Reset frame tree state. |
| 1435 // TODO(creis): Once subframes can be in different processes, we'll need to |
| 1436 // clear just the FrameTreeNodes affected by the crash (and their subtrees). |
1435 main_frame_id_ = -1; | 1437 main_frame_id_ = -1; |
1436 delegate_->GetFrameTree()->RenderProcessGone(this); | 1438 delegate_->GetFrameTree()->ResetForMainFrameSwap(); |
1437 | 1439 |
1438 // Our base class RenderWidgetHost needs to reset some stuff. | 1440 // Our base class RenderWidgetHost needs to reset some stuff. |
1439 RendererExited(render_view_termination_status_, exit_code); | 1441 RendererExited(render_view_termination_status_, exit_code); |
1440 | 1442 |
1441 delegate_->RenderViewTerminated(this, | 1443 delegate_->RenderViewTerminated(this, |
1442 static_cast<base::TerminationStatus>(status), | 1444 static_cast<base::TerminationStatus>(status), |
1443 exit_code); | 1445 exit_code); |
1444 } | 1446 } |
1445 | 1447 |
1446 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( | 1448 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 void RenderViewHostImpl::AttachToFrameTree() { | 2163 void RenderViewHostImpl::AttachToFrameTree() { |
2162 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2164 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2163 | 2165 |
2164 frame_tree->ResetForMainFrameSwap(); | 2166 frame_tree->ResetForMainFrameSwap(); |
2165 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2167 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2166 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2168 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2167 } | 2169 } |
2168 } | 2170 } |
2169 | 2171 |
2170 } // namespace content | 2172 } // namespace content |
OLD | NEW |