OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "config.h" |
| 6 #include "web/NavigatorContentUtilsClientImpl.h" |
| 7 |
| 8 #include "public/web/WebViewClient.h" |
| 9 #include "web/WebViewImpl.h" |
| 10 |
| 11 using namespace WebCore; |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) |
| 16 { |
| 17 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); |
| 18 } |
| 19 |
| 20 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) |
| 21 : m_webView(webView) |
| 22 { |
| 23 } |
| 24 |
| 25 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const WebCore::KURL& baseURL, const WebCore::KURL& url, const String& title) |
| 26 { |
| 27 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); |
| 28 } |
| 29 |
| 30 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const WebCore::KURL& baseURL
, const WebCore::KURL& url) |
| 31 { |
| 32 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi
ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); |
| 33 } |
| 34 |
| 35 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) |
| 36 { |
| 37 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); |
| 38 } |
| 39 |
| 40 } // namespace blink |
| 41 |
OLD | NEW |