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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 WasResized(); | 1183 WasResized(); |
1184 delegate_->RenderViewReady(this); | 1184 delegate_->RenderViewReady(this); |
1185 } | 1185 } |
1186 | 1186 |
1187 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { | 1187 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { |
1188 // Keep the termination status so we can get at it later when we | 1188 // Keep the termination status so we can get at it later when we |
1189 // need to know why it died. | 1189 // need to know why it died. |
1190 render_view_termination_status_ = | 1190 render_view_termination_status_ = |
1191 static_cast<base::TerminationStatus>(status); | 1191 static_cast<base::TerminationStatus>(status); |
1192 | 1192 |
1193 // Reset frame tree state associated with this process. | 1193 // Reset frame tree state associated with this process. This must happen |
| 1194 // before RenderViewTerminated because observers expect the subframes of any |
| 1195 // affected frames to be cleared first. |
1194 delegate_->GetFrameTree()->RenderProcessGone(this); | 1196 delegate_->GetFrameTree()->RenderProcessGone(this); |
1195 | 1197 |
1196 // Our base class RenderWidgetHost needs to reset some stuff. | 1198 // Our base class RenderWidgetHost needs to reset some stuff. |
1197 RendererExited(render_view_termination_status_, exit_code); | 1199 RendererExited(render_view_termination_status_, exit_code); |
1198 | 1200 |
1199 delegate_->RenderViewTerminated(this, | 1201 delegate_->RenderViewTerminated(this, |
1200 static_cast<base::TerminationStatus>(status), | 1202 static_cast<base::TerminationStatus>(status), |
1201 exit_code); | 1203 exit_code); |
1202 } | 1204 } |
1203 | 1205 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 return true; | 1780 return true; |
1779 } | 1781 } |
1780 | 1782 |
1781 void RenderViewHostImpl::AttachToFrameTree() { | 1783 void RenderViewHostImpl::AttachToFrameTree() { |
1782 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1784 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1783 | 1785 |
1784 frame_tree->ResetForMainFrameSwap(); | 1786 frame_tree->ResetForMainFrameSwap(); |
1785 } | 1787 } |
1786 | 1788 |
1787 } // namespace content | 1789 } // namespace content |
OLD | NEW |