Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2938423002: Revert of Dispatch unload event for swapped-out subframes. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698