| 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 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) | 13 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) |
| 14 { | 14 { |
| 15 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); | 15 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); |
| 16 } | 16 } |
| 17 | 17 |
| 18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) | 18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) |
| 19 : m_webView(webView) | 19 : m_webView(webView) |
| 20 { | 20 { |
| 21 } | 21 } |
| 22 | 22 |
| 23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const KURL& baseURL, const KURL& url, const String& title) | 23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const KURL& url, const String& title) |
| 24 { | 24 { |
| 25 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); | 25 m_webView->client()->registerProtocolHandler(scheme, url, title); |
| 26 } | 26 } |
| 27 | 27 |
| 28 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const KURL& baseURL, const K
URL& url) | 28 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const KURL& url) |
| 29 { | 29 { |
| 30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi
ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); | 30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi
ew->client()->isProtocolHandlerRegistered(scheme, url)); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const KURL& baseURL, const KURL& url) | 33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const KURL& url) |
| 34 { | 34 { |
| 35 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); | 35 m_webView->client()->unregisterProtocolHandler(scheme, url); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace blink | 38 } // namespace blink |
| 39 | 39 |
| OLD | NEW |