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

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

Issue 2783723002: Keep track in the browser of which frames have onunload and onbeforeunload handlers. (Closed)
Patch Set: fix content_browsertests with plznavigate and also remove now unnecessary unloadcontroller change Created 3 years, 8 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
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 4738 matching lines...) Expand 10 before | Expand all | Expand 10 after
4749 } 4749 }
4750 4750
4751 void RenderFrameImpl::enterFullscreen() { 4751 void RenderFrameImpl::enterFullscreen() {
4752 Send(new FrameHostMsg_ToggleFullscreen(routing_id_, true)); 4752 Send(new FrameHostMsg_ToggleFullscreen(routing_id_, true));
4753 } 4753 }
4754 4754
4755 void RenderFrameImpl::exitFullscreen() { 4755 void RenderFrameImpl::exitFullscreen() {
4756 Send(new FrameHostMsg_ToggleFullscreen(routing_id_, false)); 4756 Send(new FrameHostMsg_ToggleFullscreen(routing_id_, false));
4757 } 4757 }
4758 4758
4759 void RenderFrameImpl::suddenTerminationDisablerChanged(
4760 bool present,
4761 blink::WebFrameClient::SuddenTerminationDisablerType type) {
4762 switch (type) {
4763 case blink::WebFrameClient::BeforeUnloadHandler:
4764 Send(new FrameHostMsg_BeforeUnloadHandlersPresent(routing_id_, present));
4765 break;
4766 case blink::WebFrameClient::UnloadHandler:
4767 Send(new FrameHostMsg_UnloadHandlersPresent(routing_id_, present));
4768 break;
4769 default:
nasko 2017/03/29 23:31:26 Omitting the default: clause should be fine and wi
4770 NOTREACHED();
4771 }
4772 }
4773
4759 void RenderFrameImpl::registerProtocolHandler(const WebString& scheme, 4774 void RenderFrameImpl::registerProtocolHandler(const WebString& scheme,
4760 const WebURL& url, 4775 const WebURL& url,
4761 const WebString& title) { 4776 const WebString& title) {
4762 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); 4777 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture();
4763 Send(new FrameHostMsg_RegisterProtocolHandler(routing_id_, scheme.utf8(), url, 4778 Send(new FrameHostMsg_RegisterProtocolHandler(routing_id_, scheme.utf8(), url,
4764 title.utf16(), user_gesture)); 4779 title.utf16(), user_gesture));
4765 } 4780 }
4766 4781
4767 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme, 4782 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme,
4768 const WebURL& url) { 4783 const WebURL& url) {
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
6969 policy(info.defaultPolicy), 6984 policy(info.defaultPolicy),
6970 replaces_current_history_item(info.replacesCurrentHistoryItem), 6985 replaces_current_history_item(info.replacesCurrentHistoryItem),
6971 history_navigation_in_new_child_frame( 6986 history_navigation_in_new_child_frame(
6972 info.isHistoryNavigationInNewChildFrame), 6987 info.isHistoryNavigationInNewChildFrame),
6973 client_redirect(info.isClientRedirect), 6988 client_redirect(info.isClientRedirect),
6974 cache_disabled(info.isCacheDisabled), 6989 cache_disabled(info.isCacheDisabled),
6975 form(info.form), 6990 form(info.form),
6976 source_location(info.sourceLocation) {} 6991 source_location(info.sourceLocation) {}
6977 6992
6978 } // namespace content 6993 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698