Move Register/Unregister Protocol Handlers to LocalFrameHost mojo.
Move FrameHostMsg_RegisterProtocolHandler,
FrameHostMsg_UnregisterProtocolHandler messages to mojo. This allows
blink to not expose them on the WebLocalFrameClient API.
BUG=1008432
Change-Id: Ia6a505b9e33a81f6a4c209f275b6344850aeeb0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864397
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#707483}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 45c7d39..c0542f59 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -912,10 +912,6 @@
IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunContentWithCertificateErrors,
OnDidRunContentWithCertificateErrors)
IPC_MESSAGE_HANDLER(FrameHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
- IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler,
- OnRegisterProtocolHandler)
- IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler,
- OnUnregisterProtocolHandler)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
OnUpdatePageImportanceSignals)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
@@ -4930,11 +4926,11 @@
listener->FileSelectionCanceled();
}
-void WebContentsImpl::OnRegisterProtocolHandler(RenderFrameHostImpl* source,
- const std::string& protocol,
- const GURL& url,
- const base::string16& title,
- bool user_gesture) {
+void WebContentsImpl::RegisterProtocolHandler(RenderFrameHostImpl* source,
+ const std::string& protocol,
+ const GURL& url,
+ const base::string16& title,
+ bool user_gesture) {
// TODO(nick): Should we consider |source| here or pass it to the delegate?
// TODO(nick): Do we need to apply FilterURL to |url|?
if (!delegate_)
@@ -4950,10 +4946,10 @@
delegate_->RegisterProtocolHandler(this, protocol, url, user_gesture);
}
-void WebContentsImpl::OnUnregisterProtocolHandler(RenderFrameHostImpl* source,
- const std::string& protocol,
- const GURL& url,
- bool user_gesture) {
+void WebContentsImpl::UnregisterProtocolHandler(RenderFrameHostImpl* source,
+ const std::string& protocol,
+ const GURL& url,
+ bool user_gesture) {
// TODO(nick): Should we consider |source| here or pass it to the delegate?
// TODO(nick): Do we need to apply FilterURL to |url|?
if (!delegate_)