Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl.cc |
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
| index 02331996278b9fe1ed534d04604a211b0d6641c4..3b94a8a478517fa1115d2800baa867d7ec216f9d 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -534,6 +534,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, |
| IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, |
| OnRegisterProtocolHandler) |
| + IPC_MESSAGE_HANDLER(ViewHostMsg_UnregisterProtocolHandler, |
| + OnUnregisterProtocolHandler) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) |
| @@ -2736,6 +2738,20 @@ void WebContentsImpl::OnRegisterProtocolHandler(const std::string& protocol, |
| delegate_->RegisterProtocolHandler(this, protocol, url, user_gesture); |
| } |
| +void WebContentsImpl::OnUnregisterProtocolHandler(const std::string& protocol, |
| + const GURL& url, |
| + bool user_gesture) { |
| + if (!delegate_) |
| + return; |
| + |
| + ChildProcessSecurityPolicyImpl* policy = |
| + ChildProcessSecurityPolicyImpl::GetInstance(); |
| + if (policy->IsPseudoScheme(protocol)) |
| + return; |
| + |
| + delegate_->UnregisterProtocolHandler(this, protocol, url, user_gesture); |
|
jochen (gone - plz use gerrit)
2014/07/10 11:30:07
can you please implement this as well? (i.e. Brows
|
| +} |
| + |
| void WebContentsImpl::OnFindReply(int request_id, |
| int number_of_matches, |
| const gfx::Rect& selection_rect, |