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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 if (!is_swapped_out_ || !render_view_->is_swapped_out_) { | 930 if (!is_swapped_out_ || !render_view_->is_swapped_out_) { |
931 // Swap this RenderFrame out so the frame can navigate to a page rendered by | 931 // Swap this RenderFrame out so the frame can navigate to a page rendered by |
932 // a different process. This involves running the unload handler and | 932 // a different process. This involves running the unload handler and |
933 // clearing the page. Once WasSwappedOut is called, we also allow this | 933 // clearing the page. Once WasSwappedOut is called, we also allow this |
934 // process to exit if there are no other active RenderFrames in it. | 934 // process to exit if there are no other active RenderFrames in it. |
935 | 935 |
936 // Send an UpdateState message before we get swapped out. Create the | 936 // Send an UpdateState message before we get swapped out. Create the |
937 // RenderFrameProxy as well so its routing id is registered for receiving | 937 // RenderFrameProxy as well so its routing id is registered for receiving |
938 // IPC messages. | 938 // IPC messages. |
939 render_view_->SyncNavigationState(); | 939 render_view_->SyncNavigationState(); |
940 proxy = RenderFrameProxy::CreateFrameProxy(proxy_routing_id, routing_id_); | 940 proxy = RenderFrameProxy::CreateProxyToReplaceFrame(proxy_routing_id, |
| 941 routing_id_); |
941 | 942 |
942 // Synchronously run the unload handler before sending the ACK. | 943 // Synchronously run the unload handler before sending the ACK. |
943 // TODO(creis): Call dispatchUnloadEvent unconditionally here to support | 944 // TODO(creis): Call dispatchUnloadEvent unconditionally here to support |
944 // unload on subframes as well. | 945 // unload on subframes as well. |
945 if (!frame_->parent()) | 946 if (!frame_->parent()) |
946 frame_->dispatchUnloadEvent(); | 947 frame_->dispatchUnloadEvent(); |
947 | 948 |
948 // Swap out and stop sending any IPC messages that are not ACKs. | 949 // Swap out and stop sending any IPC messages that are not ACKs. |
949 if (!frame_->parent()) | 950 if (!frame_->parent()) |
950 render_view_->SetSwappedOut(true); | 951 render_view_->SetSwappedOut(true); |
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3564 | 3565 |
3565 #if defined(ENABLE_BROWSER_CDMS) | 3566 #if defined(ENABLE_BROWSER_CDMS) |
3566 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3567 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3567 if (!cdm_manager_) | 3568 if (!cdm_manager_) |
3568 cdm_manager_ = new RendererCdmManager(this); | 3569 cdm_manager_ = new RendererCdmManager(this); |
3569 return cdm_manager_; | 3570 return cdm_manager_; |
3570 } | 3571 } |
3571 #endif // defined(ENABLE_BROWSER_CDMS) | 3572 #endif // defined(ENABLE_BROWSER_CDMS) |
3572 | 3573 |
3573 } // namespace content | 3574 } // namespace content |
OLD | NEW |