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