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