| 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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) | 958 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) |
| 959 IPC_END_MESSAGE_MAP() | 959 IPC_END_MESSAGE_MAP() |
| 960 | 960 |
| 961 return handled; | 961 return handled; |
| 962 } | 962 } |
| 963 | 963 |
| 964 void RenderViewHostImpl::RenderWidgetDidInit() { | 964 void RenderViewHostImpl::RenderWidgetDidInit() { |
| 965 PostRenderViewReady(); | 965 PostRenderViewReady(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 void RenderViewHostImpl::Shutdown() { | 968 void RenderViewHostImpl::ShutdownAndDestroy() { |
| 969 // We can't release the SessionStorageNamespace until our peer | 969 // We can't release the SessionStorageNamespace until our peer |
| 970 // in the renderer has wound down. | 970 // in the renderer has wound down. |
| 971 if (GetProcess()->HasConnection()) { | 971 if (GetProcess()->HasConnection()) { |
| 972 RenderProcessHostImpl::ReleaseOnCloseACK( | 972 RenderProcessHostImpl::ReleaseOnCloseACK( |
| 973 GetProcess(), | 973 GetProcess(), |
| 974 delegate_->GetSessionStorageNamespaceMap(), | 974 delegate_->GetSessionStorageNamespaceMap(), |
| 975 GetRoutingID()); | 975 GetRoutingID()); |
| 976 } | 976 } |
| 977 | 977 |
| 978 RenderWidgetHostImpl::Shutdown(); | 978 GetWidget()->ShutdownWidget(false); |
| 979 delete this; |
| 979 } | 980 } |
| 980 | 981 |
| 981 void RenderViewHostImpl::RenderWidgetWillBeHidden() { | 982 void RenderViewHostImpl::RenderWidgetWillBeHidden() { |
| 982 if (ResourceDispatcherHostImpl::Get()) { | 983 if (ResourceDispatcherHostImpl::Get()) { |
| 983 BrowserThread::PostTask( | 984 BrowserThread::PostTask( |
| 984 BrowserThread::IO, FROM_HERE, | 985 BrowserThread::IO, FROM_HERE, |
| 985 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostWasHidden, | 986 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostWasHidden, |
| 986 base::Unretained(ResourceDispatcherHostImpl::Get()), | 987 base::Unretained(ResourceDispatcherHostImpl::Get()), |
| 987 GetProcess()->GetID(), GetRoutingID())); | 988 GetProcess()->GetID(), GetRoutingID())); |
| 988 } | 989 } |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 } else { | 1409 } else { |
| 1409 render_view_ready_on_process_launch_ = true; | 1410 render_view_ready_on_process_launch_ = true; |
| 1410 } | 1411 } |
| 1411 } | 1412 } |
| 1412 | 1413 |
| 1413 void RenderViewHostImpl::RenderViewReady() { | 1414 void RenderViewHostImpl::RenderViewReady() { |
| 1414 delegate_->RenderViewReady(this); | 1415 delegate_->RenderViewReady(this); |
| 1415 } | 1416 } |
| 1416 | 1417 |
| 1417 } // namespace content | 1418 } // namespace content |
| OLD | NEW |