Index: chrome/browser/custom_handlers/protocol_handler_registry.cc |
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc |
index dbeda49a088579a2bc60211604999f0137ddae93..733e935d834f1c1791d4216eaf9227b55038828a 100644 |
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc |
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc |
@@ -14,6 +14,7 @@ |
#include "chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h" |
#include "chrome/browser/net/chrome_url_request_context.h" |
#include "chrome/browser/profiles/profile_io_data.h" |
+#include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/custom_handlers/protocol_handler.h" |
#include "chrome/common/pref_names.h" |
@@ -332,6 +333,17 @@ bool ProtocolHandlerRegistry::SilentlyHandleRegisterHandlerRequest( |
return false; |
} |
+void ProtocolHandlerRegistry::RequestPermission( |
+ content::WebContents* web_contents, |
+ const ProtocolHandler& handler) { |
+ if (PermissionBubbleManager::Enabled()) { |
+ return; |
+ } |
+ |
+ RegisterProtocolHandlerInfoBarDelegate::Create( |
+ InfoBarService::FromWebContents(web_contents), this, handler); |
+} |
+ |
void ProtocolHandlerRegistry::OnAcceptRegisterProtocolHandler( |
const ProtocolHandler& handler) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |