summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h')
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h137
1 files changed, 78 insertions, 59 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
index c420beec7..8d4a31070 100644
--- a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
+++ b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
@@ -29,13 +30,12 @@
#define PageClientImpl_h
#include "DefaultUndoController.h"
-#include "KeyBindingTranslator.h"
#include "PageClient.h"
#include "WebFullScreenManagerProxy.h"
#include "WebPageProxy.h"
-#include "WindowsKeyboardCodes.h"
#include <WebCore/IntSize.h>
#include <gtk/gtk.h>
+#include <memory>
namespace WebKit {
@@ -48,87 +48,106 @@ class PageClientImpl : public PageClient
#endif
{
public:
- ~PageClientImpl();
- static PassOwnPtr<PageClientImpl> create(GtkWidget* viewWidget)
- {
- return adoptPtr(new PageClientImpl(viewWidget));
- }
+ explicit PageClientImpl(GtkWidget*);
GtkWidget* viewWidget() { return m_viewWidget; }
private:
- explicit PageClientImpl(GtkWidget*);
-
// PageClient
- virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
- virtual void setViewNeedsDisplay(const WebCore::IntRect&) override;
- virtual void displayView() override;
- virtual bool canScrollView() override { return false; }
- virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) override;
- virtual WebCore::IntSize viewSize() override;
- virtual bool isViewWindowActive() override;
- virtual bool isViewFocused() override;
- virtual bool isViewVisible() override;
- virtual bool isViewInWindow() override;
- virtual void processDidCrash() override;
- virtual void didRelaunchProcess() override;
- virtual void pageClosed() override;
- virtual void preferencesDidChange() override;
- virtual void toolTipChanged(const WTF::String&, const WTF::String&) override;
- virtual void setCursor(const WebCore::Cursor&) override;
- virtual void setCursorHiddenUntilMouseMoves(bool) override;
- virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&) override;
- virtual void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo) override;
- virtual void clearAllEditCommands() override;
- virtual bool canUndoRedo(WebPageProxy::UndoOrRedo) override;
- virtual void executeUndoRedo(WebPageProxy::UndoOrRedo) override;
- virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
- virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
- virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) override;
- virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;
- virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
- virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
- virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+ std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
+ void setViewNeedsDisplay(const WebCore::Region&) override;
+ void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll) override;
+ WebCore::IntSize viewSize() override;
+ bool isViewWindowActive() override;
+ bool isViewFocused() override;
+ bool isViewVisible() override;
+ bool isViewInWindow() override;
+ void processDidExit() override;
+ void didRelaunchProcess() override;
+ void pageClosed() override;
+ void preferencesDidChange() override;
+ void toolTipChanged(const WTF::String&, const WTF::String&) override;
+ void setCursor(const WebCore::Cursor&) override;
+ void setCursorHiddenUntilMouseMoves(bool) override;
+ void didChangeViewportProperties(const WebCore::ViewportAttributes&) override;
+ void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo) override;
+ void clearAllEditCommands() override;
+ bool canUndoRedo(WebPageProxy::UndoOrRedo) override;
+ void executeUndoRedo(WebPageProxy::UndoOrRedo) override;
+ WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
+ WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
+ WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
+ WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override;
+ void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
+ RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) override;
+ std::unique_ptr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy&, const ContextMenuContextData&, const UserData&) override;
#if ENABLE(INPUT_TYPE_COLOR)
- virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&) override;
+ RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&) override;
#endif
- virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) override;
- virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&) override;
- virtual void updateTextInputState() override;
+ void selectionDidChange() override;
#if ENABLE(DRAG_SUPPORT)
- virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) override;
+ void startDrag(Ref<WebCore::SelectionData>&&, WebCore::DragOperation, RefPtr<ShareableBitmap>&& dragImage) override;
#endif
-#if USE(ACCELERATED_COMPOSITING)
- virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) override;
- virtual void exitAcceleratedCompositingMode() override;
- virtual void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
-#endif
+ void enterAcceleratedCompositingMode(const LayerTreeContext&) override;
+ void exitAcceleratedCompositingMode() override;
+ void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
- virtual void handleDownloadRequest(DownloadProxy*) override;
- virtual void didCommitLoadForMainFrame() override;
+ void handleDownloadRequest(DownloadProxy*) override;
+ void didChangeContentSize(const WebCore::IntSize&) override;
+ void didCommitLoadForMainFrame(const String& mimeType, bool useCustomContentProvider) override;
+ void didFailLoadForMainFrame() override { }
// Auxiliary Client Creation
#if ENABLE(FULLSCREEN_API)
- virtual WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() final;
+ WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() final;
#endif
#if ENABLE(FULLSCREEN_API)
// WebFullScreenManagerProxyClient
- virtual void closeFullScreenManager() override;
- virtual bool isFullScreen() override;
- virtual void enterFullScreen() override;
- virtual void exitFullScreen() override;
- virtual void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
- virtual void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
+ void closeFullScreenManager() override;
+ bool isFullScreen() override;
+ void enterFullScreen() override;
+ void exitFullScreen() override;
+ void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
+ void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
+#endif
+
+ void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&) override;
+
+ void navigationGestureDidBegin() override;
+ void navigationGestureWillEnd(bool, WebBackForwardListItem&) override;
+ void navigationGestureDidEnd(bool, WebBackForwardListItem&) override;
+ void navigationGestureDidEnd() override;
+ void willRecordNavigationSnapshot(WebBackForwardListItem&) override;
+ void didRemoveNavigationGestureSnapshot() override;
+
+ void didFirstVisuallyNonEmptyLayoutForMainFrame() override;
+ void didFinishLoadForMainFrame() override;
+ void didSameDocumentNavigationForMainFrame(SameDocumentNavigationType) override;
+
+#if ENABLE(TOUCH_EVENTS)
+ void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
+#endif
+
+ void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
+
+ void didChangeBackgroundColor() override;
+
+ void refView() override;
+ void derefView() override;
+
+ void didRestoreScrollPosition() override { }
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ bool decidePolicyForInstallMissingMediaPluginsPermissionRequest(InstallMissingMediaPluginsPermissionRequest&) override;
#endif
- virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
+ WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override { return WebCore::UserInterfaceLayoutDirection::LTR; }
// Members of PageClientImpl class
GtkWidget* m_viewWidget;
DefaultUndoController m_undoController;
- WebCore::KeyBindingTranslator m_keyBindingTranslator;
};
} // namespace WebKit