| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/NavigatorContentUtilsClientImpl.h" | 6 #include "web/NavigatorContentUtilsClientImpl.h" |
| 7 | 7 |
| 8 #include "public/web/WebViewClient.h" | 8 #include "public/web/WebViewClient.h" |
| 9 #include "web/WebViewImpl.h" | 9 #include "web/WebViewImpl.h" |
| 10 | 10 |
| 11 using namespace blink; | 11 using namespace blink; |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) | 15 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) |
| 16 { | 16 { |
| 17 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); | 17 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); |
| 18 } | 18 } |
| 19 | 19 |
| 20 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) | 20 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) |
| 21 : m_webView(webView) | 21 : m_webView(webView) |
| 22 { | 22 { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const blink::KURL& baseURL, const blink::KURL& url, const String& title) | 25 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const blink::KURL& url, const String& title) |
| 26 { | 26 { |
| 27 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); | 27 m_webView->client()->registerProtocolHandler(scheme, url, title); |
| 28 } | 28 } |
| 29 | 29 |
| 30 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const blink::KURL& baseURL,
const blink::KURL& url) | 30 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const blink::KURL& url) |
| 31 { | 31 { |
| 32 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi
ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); | 32 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi
ew->client()->isProtocolHandlerRegistered(scheme, url)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const blink::KURL& baseURL, const blink::KURL& url) | 35 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const blink::KURL& url) |
| 36 { | 36 { |
| 37 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); | 37 m_webView->client()->unregisterProtocolHandler(scheme, url); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace blink | 40 } // namespace blink |
| 41 | 41 |
| OLD | NEW |