Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / NavigatorContentUtilsClientImpl.cpp
blobb6d513d7576d3b761c1c255d92da314cc4ae66ea
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "web/NavigatorContentUtilsClientImpl.h"
8 #include "public/web/WebFrameClient.h"
9 #include "web/WebLocalFrameImpl.h"
11 namespace blink {
13 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(WebLocalFrameImpl* webFrame)
15 return adoptPtr(new NavigatorContentUtilsClientImpl(webFrame));
18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebLocalFrameImpl* webFrame)
19 : m_webFrame(webFrame)
23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& scheme, const KURL& url, const String& title)
25 m_webFrame->client()->registerProtocolHandler(scheme, url, title);
28 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl::isProtocolHandlerRegistered(const String& scheme, const KURL& url)
30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webFrame->client()->isProtocolHandlerRegistered(scheme, url));
33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& scheme, const KURL& url)
35 m_webFrame->client()->unregisterProtocolHandler(scheme, url);
38 } // namespace blink