| 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 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 | 1783 |
| 1784 // Send an UpdateState message before we get deleted. | 1784 // Send an UpdateState message before we get deleted. |
| 1785 SendUpdateState(); | 1785 SendUpdateState(); |
| 1786 | 1786 |
| 1787 // There should always be a proxy to replace this RenderFrame. Create it now | 1787 // There should always be a proxy to replace this RenderFrame. Create it now |
| 1788 // so its routing id is registered for receiving IPC messages. | 1788 // so its routing id is registered for receiving IPC messages. |
| 1789 CHECK_NE(proxy_routing_id, MSG_ROUTING_NONE); | 1789 CHECK_NE(proxy_routing_id, MSG_ROUTING_NONE); |
| 1790 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( | 1790 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( |
| 1791 this, proxy_routing_id, replicated_frame_state.scope); | 1791 this, proxy_routing_id, replicated_frame_state.scope); |
| 1792 | 1792 |
| 1793 // Synchronously run the unload handler before sending the ACK. |
| 1794 // TODO(creis): Call dispatchUnloadEvent unconditionally here to support |
| 1795 // unload on subframes as well. |
| 1796 if (is_main_frame_) |
| 1797 frame_->DispatchUnloadEvent(); |
| 1798 |
| 1793 // Swap out and stop sending any IPC messages that are not ACKs. | 1799 // Swap out and stop sending any IPC messages that are not ACKs. |
| 1794 if (is_main_frame_) | 1800 if (is_main_frame_) |
| 1795 render_view_->SetSwappedOut(true); | 1801 render_view_->SetSwappedOut(true); |
| 1796 | 1802 |
| 1797 RenderViewImpl* render_view = render_view_; | 1803 RenderViewImpl* render_view = render_view_; |
| 1798 bool is_main_frame = is_main_frame_; | 1804 bool is_main_frame = is_main_frame_; |
| 1799 int routing_id = GetRoutingID(); | 1805 int routing_id = GetRoutingID(); |
| 1800 | 1806 |
| 1801 // Now that all of the cleanup is complete and the browser side is notified, | 1807 // Now that all of the cleanup is complete and the browser side is notified, |
| 1802 // start using the RenderFrameProxy. | 1808 // start using the RenderFrameProxy. |
| (...skipping 5046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6849 policy(info.default_policy), | 6855 policy(info.default_policy), |
| 6850 replaces_current_history_item(info.replaces_current_history_item), | 6856 replaces_current_history_item(info.replaces_current_history_item), |
| 6851 history_navigation_in_new_child_frame( | 6857 history_navigation_in_new_child_frame( |
| 6852 info.is_history_navigation_in_new_child_frame), | 6858 info.is_history_navigation_in_new_child_frame), |
| 6853 client_redirect(info.is_client_redirect), | 6859 client_redirect(info.is_client_redirect), |
| 6854 cache_disabled(info.is_cache_disabled), | 6860 cache_disabled(info.is_cache_disabled), |
| 6855 form(info.form), | 6861 form(info.form), |
| 6856 source_location(info.source_location) {} | 6862 source_location(info.source_location) {} |
| 6857 | 6863 |
| 6858 } // namespace content | 6864 } // namespace content |
| OLD | NEW |