| 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 "web/NavigatorContentUtilsClientImpl.h" | 5 #include "web/NavigatorContentUtilsClientImpl.h" |
| 6 | 6 |
| 7 #include "public/web/WebFrameClient.h" | 7 #include "public/web/WebFrameClient.h" |
| 8 #include "web/WebLocalFrameImpl.h" | 8 #include "web/WebLocalFrameImpl.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 PassOwnPtrWillBeRawPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsCli
entImpl::create(WebLocalFrameImpl* webFrame) | 12 RawPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(
WebLocalFrameImpl* webFrame) |
| 13 { | 13 { |
| 14 return adoptPtrWillBeNoop(new NavigatorContentUtilsClientImpl(webFrame)); | 14 return (new NavigatorContentUtilsClientImpl(webFrame)); |
| 15 } | 15 } |
| 16 | 16 |
| 17 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebLocalFrameIm
pl* webFrame) | 17 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebLocalFrameIm
pl* webFrame) |
| 18 : m_webFrame(webFrame) | 18 : m_webFrame(webFrame) |
| 19 { | 19 { |
| 20 } | 20 } |
| 21 | 21 |
| 22 DEFINE_TRACE(NavigatorContentUtilsClientImpl) | 22 DEFINE_TRACE(NavigatorContentUtilsClientImpl) |
| 23 { | 23 { |
| 24 visitor->trace(m_webFrame); | 24 visitor->trace(m_webFrame); |
| 25 NavigatorContentUtilsClient::trace(visitor); | 25 NavigatorContentUtilsClient::trace(visitor); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const KURL& url, const String& title) | 28 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const KURL& url, const String& title) |
| 29 { | 29 { |
| 30 m_webFrame->client()->registerProtocolHandler(scheme, url, title); | 30 m_webFrame->client()->registerProtocolHandler(scheme, url, title); |
| 31 } | 31 } |
| 32 | 32 |
| 33 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const KURL& url) | 33 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl
::isProtocolHandlerRegistered(const String& scheme, const KURL& url) |
| 34 { | 34 { |
| 35 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webFr
ame->client()->isProtocolHandlerRegistered(scheme, url)); | 35 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webFr
ame->client()->isProtocolHandlerRegistered(scheme, url)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const KURL& url) | 38 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc
heme, const KURL& url) |
| 39 { | 39 { |
| 40 m_webFrame->client()->unregisterProtocolHandler(scheme, url); | 40 m_webFrame->client()->unregisterProtocolHandler(scheme, url); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace blink | 43 } // namespace blink |
| OLD | NEW |