NavigatorContentUtilsClientImpl has own files

NavigatorContentUtilsClientImpl has been placed in ChromeClientImpl.cpp.
It would be good if NavigatorContentUtilsClientImpl has own file, because
new functions have been added to the NavigatorContentUtilsClientImpl. Besides
more functionality will be added in future.

BUG=none

Review URL: https://codereview.chromium.org/331223002

git-svn-id: svn://svn.chromium.org/blink/trunk@176286 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 823f3f6d
......@@ -887,30 +887,4 @@ bool ChromeClientImpl::usesGpuRasterization()
return m_webView->layerTreeView()->usesGpuRasterization();
}
PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(WebViewImpl* webView)
{
return adoptPtr(new NavigatorContentUtilsClientImpl(webView));
}
NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
}
void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url, const String& title)
{
m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
}
NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl::isProtocolHandlerRegistered(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
{
return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webView->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
}
void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
{
m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
}
} // namespace blink
......@@ -201,21 +201,6 @@ private:
WebCore::PagePopupDriver* m_pagePopupDriver;
};
class NavigatorContentUtilsClientImpl FINAL : public WebCore::NavigatorContentUtilsClient {
public:
static PassOwnPtr<NavigatorContentUtilsClientImpl> create(WebViewImpl*);
virtual ~NavigatorContentUtilsClientImpl() { }
virtual void registerProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&, const String& title) OVERRIDE;
virtual CustomHandlersState isProtocolHandlerRegistered(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&) OVERRIDE;
virtual void unregisterProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&) OVERRIDE;
private:
explicit NavigatorContentUtilsClientImpl(WebViewImpl*);
WebViewImpl* m_webView;
};
DEFINE_TYPE_CASTS(ChromeClientImpl, WebCore::ChromeClient, client, client->isChromeClientImpl(), client.isChromeClientImpl());
} // namespace blink
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "web/NavigatorContentUtilsClientImpl.h"
#include "public/web/WebViewClient.h"
#include "web/WebViewImpl.h"
using namespace WebCore;
namespace blink {
PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(WebViewImpl* webView)
{
return adoptPtr(new NavigatorContentUtilsClientImpl(webView));
}
NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
}
void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url, const String& title)
{
m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
}
NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl::isProtocolHandlerRegistered(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
{
return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webView->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
}
void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
{
m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
}
} // namespace blink
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NavigatorContentUtilsClientImpl_h
#define NavigatorContentUtilsClientImpl_h
#include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
#include "platform/weborigin/KURL.h"
namespace blink {
class WebViewImpl;
class NavigatorContentUtilsClientImpl FINAL : public WebCore::NavigatorContentUtilsClient {
public:
static PassOwnPtr<NavigatorContentUtilsClientImpl> create(WebViewImpl*);
virtual ~NavigatorContentUtilsClientImpl() { }
virtual void registerProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&, const String& title) OVERRIDE;
virtual CustomHandlersState isProtocolHandlerRegistered(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&) OVERRIDE;
virtual void unregisterProtocolHandler(const String& scheme, const WebCore::KURL& baseURL, const WebCore::KURL&) OVERRIDE;
private:
explicit NavigatorContentUtilsClientImpl(WebViewImpl*);
WebViewImpl* m_webView;
};
} // namespace blink
#endif // NavigatorContentUtilsClientImpl_h
......@@ -132,6 +132,7 @@
#include "web/FullscreenController.h"
#include "web/GraphicsLayerFactoryChromium.h"
#include "web/LinkHighlight.h"
#include "web/NavigatorContentUtilsClientImpl.h"
#include "web/PopupContainer.h"
#include "web/PrerendererClientImpl.h"
#include "web/SpeechRecognitionClientProxy.h"
......
......@@ -57,6 +57,8 @@
'MediaKeysClientImpl.h',
'MIDIClientProxy.cpp',
'MIDIClientProxy.h',
'NavigatorContentUtilsClientImpl.cpp',
'NavigatorContentUtilsClientImpl.h',
'NotificationPresenterImpl.cpp',
'NotificationPresenterImpl.h',
'OpenedFrameTracker.cpp',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment