summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/qwkpage_p.h')
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwkpage_p.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h b/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
new file mode 100644
index 0000000..85135c2
--- /dev/null
+++ b/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef qwkpage_p_h
+#define qwkpage_p_h
+
+#include "DrawingAreaProxy.h"
+#include "PageClient.h"
+#include "qwkpage.h"
+#include "WebPageProxy.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
+#include <QBasicTimer>
+#include <QGraphicsView>
+#include <QKeyEvent>
+
+class QGraphicsWKView;
+class QWKPreferences;
+
+class QWKPagePrivate : WebKit::PageClient {
+public:
+ QWKPagePrivate(QWKPage*, QWKContext*);
+ ~QWKPagePrivate();
+
+ static QWKPagePrivate* get(QWKPage* page) { return page->d; }
+
+ void init(QGraphicsItem*, WTF::PassOwnPtr<WebKit::DrawingAreaProxy>);
+
+ // PageClient
+ virtual PassOwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
+ virtual void setViewNeedsDisplay(const WebCore::IntRect&);
+ virtual void displayView();
+
+ virtual WebCore::IntSize viewSize();
+ virtual bool isViewWindowActive();
+ virtual bool isViewFocused();
+ virtual bool isViewVisible();
+ virtual bool isViewInWindow();
+
+#if USE(ACCELERATED_COMPOSITING)
+ void pageDidEnterAcceleratedCompositing() { }
+ void pageDidLeaveAcceleratedCompositing() { }
+#endif // USE(ACCELERATED_COMPOSITING)
+ virtual void pageDidRequestScroll(const WebCore::IntSize&);
+ virtual void processDidCrash() { }
+ virtual void didRelaunchProcess() { }
+ virtual void didChangeContentsSize(const WebCore::IntSize&);
+ virtual void didFindZoomableArea(const WebCore::IntRect&);
+ virtual void setCursor(const WebCore::Cursor&);
+ virtual void setViewportArguments(const WebCore::ViewportArguments&);
+ virtual void takeFocus(bool direction);
+ virtual void toolTipChanged(const WTF::String&, const WTF::String&);
+ virtual void registerEditCommand(PassRefPtr<WebKit::WebEditCommandProxy>, WebKit::WebPageProxy::UndoOrRedo);
+ virtual void clearAllEditCommands();
+ virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
+ virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
+ virtual void didNotHandleKeyEvent(const WebKit::NativeWebKeyboardEvent&);
+ virtual void selectionChanged(bool, bool, bool, bool);
+ virtual PassRefPtr<WebKit::WebPopupMenuProxy> createPopupMenuProxy(WebKit::WebPageProxy*);
+ virtual PassRefPtr<WebKit::WebContextMenuProxy> createContextMenuProxy(WebKit::WebPageProxy*);
+
+ virtual void setFindIndicator(PassRefPtr<WebKit::FindIndicator>, bool fadeOut);
+
+ virtual void didCommitLoadForMainFrame(bool useCustomRepresentation);
+ virtual void didFinishLoadingDataForCustomRepresentation(const CoreIPC::DataReference&);
+ virtual double customRepresentationZoomFactor() { return 1; }
+ virtual void setCustomRepresentationZoomFactor(double) { }
+
+ void paint(QPainter* painter, QRect);
+
+ void keyPressEvent(QKeyEvent*);
+ void keyReleaseEvent(QKeyEvent*);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent*);
+ void mousePressEvent(QGraphicsSceneMouseEvent*);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
+ void wheelEvent(QGraphicsSceneWheelEvent*);
+
+ void updateAction(QWKPage::WebAction action);
+ void updateNavigationActions();
+ void updateEditorActions();
+ void setEditCommandState(const WTF::String&, bool, int);
+
+ void _q_webActionTriggered(bool checked);
+
+ void touchEvent(QTouchEvent*);
+
+ QWKPage* q;
+
+ QGraphicsItem* view;
+ QWKContext* context;
+ QWKHistory* history;
+
+ QAction* actions[QWKPage::WebActionCount];
+ QWKPreferences* preferences;
+
+ RefPtr<WebKit::WebPageProxy> page;
+
+ WebCore::ViewportArguments viewportArguments;
+
+ QWKPage::CreateNewPageFn createNewPageFn;
+
+ QPoint tripleClick;
+ QBasicTimer tripleClickTimer;
+};
+
+class QtViewportAttributesPrivate : public QSharedData {
+public:
+ QtViewportAttributesPrivate(QWKPage::ViewportAttributes* qq)
+ : q(qq)
+ { }
+
+ QWKPage::ViewportAttributes* q;
+};
+
+
+#endif /* qkpage_p_h */