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