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.
6 #include "web/NavigatorContentUtilsClientImpl.h"
8 #include "public/web/WebFrameClient.h"
9 #include "web/WebLocalFrameImpl.h"
13 PassOwnPtr
<NavigatorContentUtilsClientImpl
> NavigatorContentUtilsClientImpl::create(WebLocalFrameImpl
* webFrame
)
15 return adoptPtr(new NavigatorContentUtilsClientImpl(webFrame
));
18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebLocalFrameImpl
* webFrame
)
19 : m_webFrame(webFrame
)
23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String
& scheme
, const KURL
& url
, const String
& title
)
25 m_webFrame
->client()->registerProtocolHandler(scheme
, url
, title
);
28 NavigatorContentUtilsClient::CustomHandlersState
NavigatorContentUtilsClientImpl::isProtocolHandlerRegistered(const String
& scheme
, const KURL
& url
)
30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState
>(m_webFrame
->client()->isProtocolHandlerRegistered(scheme
, url
));
33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String
& scheme
, const KURL
& url
)
35 m_webFrame
->client()->unregisterProtocolHandler(scheme
, url
);