PageClientImpl.cpp [plain text]
#include "config.h"
#include "PageClientImpl.h"
#include "DrawingAreaProxyImpl.h"
#include "NotImplemented.h"
#include "WebContextMenuProxyWin.h"
#include "WebPageProxy.h"
#include "WebView.h"
using namespace WebCore;
namespace WebKit {
PageClientImpl::PageClientImpl(WebView& view)
: m_view(view)
{
}
std::unique_ptr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
{
return std::make_unique<DrawingAreaProxyImpl>(*m_view.page());
}
void PageClientImpl::setViewNeedsDisplay(const WebCore::Region& region)
{
m_view.setViewNeedsDisplay(region);
}
void PageClientImpl::requestScroll(const WebCore::FloatPoint&, const WebCore::IntPoint&, bool)
{
notImplemented();
}
WebCore::FloatPoint PageClientImpl::viewScrollPosition()
{
notImplemented();
return { };
}
WebCore::IntSize PageClientImpl::viewSize()
{
if (m_view.drawingArea())
return m_view.drawingArea()->size();
return IntSize();
}
bool PageClientImpl::isViewWindowActive()
{
return m_view.isWindowActive();
}
bool PageClientImpl::isViewFocused()
{
return m_view.isFocused();
}
bool PageClientImpl::isViewVisible()
{
return m_view.isVisible();
}
bool PageClientImpl::isViewInWindow()
{
return m_view.isInWindow();
}
void PageClientImpl::PageClientImpl::processDidExit()
{
notImplemented();
}
void PageClientImpl::didRelaunchProcess()
{
notImplemented();
}
void PageClientImpl::toolTipChanged(const String&, const String&)
{
notImplemented();
}
void PageClientImpl::setCursor(const WebCore::Cursor& cursor)
{
notImplemented();
}
void PageClientImpl::setCursorHiddenUntilMouseMoves(bool )
{
notImplemented();
}
void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttributes&)
{
notImplemented();
}
void PageClientImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, WebPageProxy::UndoOrRedo undoOrRedo)
{
m_undoController.registerEditCommand(WTFMove(command), undoOrRedo);
}
void PageClientImpl::clearAllEditCommands()
{
m_undoController.clearAllEditCommands();
}
bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
return m_undoController.canUndoRedo(undoOrRedo);
}
void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
m_undoController.executeUndoRedo(undoOrRedo);
}
FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& viewRect)
{
notImplemented();
return viewRect;
}
FloatRect PageClientImpl::convertToUserSpace(const FloatRect& viewRect)
{
notImplemented();
return viewRect;
}
IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
{
return IntPoint();
}
IntRect PageClientImpl::rootViewToScreen(const IntRect& rect)
{
return IntRect();
}
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool wasEventHandled)
{
notImplemented();
}
RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
{
return nullptr;
}
#if ENABLE(CONTEXT_MENUS)
Ref<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& page, ContextMenuContextData&& context, const UserData& userData)
{
return WebContextMenuProxyWin::create(page, WTFMove(context), userData);
}
#endif
#if ENABLE(INPUT_TYPE_COLOR)
RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&)
{
return nullptr;
}
#endif
void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
{
notImplemented();
}
void PageClientImpl::exitAcceleratedCompositingMode()
{
notImplemented();
}
void PageClientImpl::updateAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
{
notImplemented();
}
void PageClientImpl::pageClosed()
{
notImplemented();
}
void PageClientImpl::preferencesDidChange()
{
notImplemented();
}
void PageClientImpl::didChangeContentSize(const IntSize& size)
{
notImplemented();
}
void PageClientImpl::handleDownloadRequest(DownloadProxy* download)
{
notImplemented();
}
void PageClientImpl::didCommitLoadForMainFrame(const String& , bool )
{
notImplemented();
}
#if ENABLE(FULLSCREEN_API)
WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()
{
return *this;
}
void PageClientImpl::closeFullScreenManager()
{
notImplemented();
}
bool PageClientImpl::isFullScreen()
{
notImplemented();
return false;
}
void PageClientImpl::enterFullScreen()
{
notImplemented();
}
void PageClientImpl::exitFullScreen()
{
notImplemented();
}
void PageClientImpl::beganEnterFullScreen(const IntRect& , const IntRect& )
{
notImplemented();
}
void PageClientImpl::beganExitFullScreen(const IntRect& , const IntRect& )
{
notImplemented();
}
#endif // ENABLE(FULLSCREEN_API)
#if ENABLE(TOUCH_EVENTS)
void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& event, bool wasEventHandled)
{
notImplemented();
}
#endif // ENABLE(TOUCH_EVENTS)
void PageClientImpl::wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent& event)
{
notImplemented();
}
void PageClientImpl::didFinishLoadingDataForCustomContentProvider(const String&, const IPC::DataReference&)
{
notImplemented();
}
void PageClientImpl::navigationGestureDidBegin()
{
notImplemented();
}
void PageClientImpl::navigationGestureWillEnd(bool, WebBackForwardListItem&)
{
notImplemented();
}
void PageClientImpl::navigationGestureDidEnd(bool, WebBackForwardListItem&)
{
notImplemented();
}
void PageClientImpl::navigationGestureDidEnd()
{
notImplemented();
}
void PageClientImpl::willRecordNavigationSnapshot(WebBackForwardListItem&)
{
notImplemented();
}
void PageClientImpl::didRemoveNavigationGestureSnapshot()
{
notImplemented();
}
void PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame()
{
notImplemented();
}
void PageClientImpl::didFinishLoadForMainFrame()
{
notImplemented();
}
void PageClientImpl::didSameDocumentNavigationForMainFrame(SameDocumentNavigationType)
{
notImplemented();
}
void PageClientImpl::didChangeBackgroundColor()
{
notImplemented();
}
void PageClientImpl::isPlayingAudioWillChange()
{
notImplemented();
}
void PageClientImpl::isPlayingAudioDidChange()
{
notImplemented();
}
void PageClientImpl::refView()
{
notImplemented();
}
void PageClientImpl::derefView()
{
notImplemented();
}
HWND PageClientImpl::viewWidget()
{
return m_view.window();
}
}