summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.h')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.h57
1 files changed, 49 insertions, 8 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h
index bc84e359c..d9d2df72c 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h
@@ -32,7 +32,9 @@
#include "GeolocationPermissionRequestManager.h"
#include "ImageOptions.h"
#include "ImmutableArray.h"
+#if ENABLE(CONTEXT_MENUS)
#include "InjectedBundlePageContextMenuClient.h"
+#endif
#include "InjectedBundlePageEditorClient.h"
#include "InjectedBundlePageFormClient.h"
#include "InjectedBundlePageFullScreenClient.h"
@@ -81,6 +83,7 @@
#if PLATFORM(MAC)
#include "DictionaryPopupInfo.h"
+#include "LayerHostingContext.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS NSDictionary;
OBJC_CLASS NSObject;
@@ -215,7 +218,9 @@ public:
void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
// -- InjectedBundle methods
+#if ENABLE(CONTEXT_MENUS)
void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*);
+#endif
void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
@@ -226,7 +231,9 @@ public:
void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClient*);
#endif
+#if ENABLE(CONTEXT_MENUS)
InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
+#endif
InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
@@ -299,7 +306,11 @@ public:
void addPluginView(PluginView*);
void removePluginView(PluginView*);
+ LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
+ void setLayerHostingMode(LayerHostingMode);
+
bool windowIsVisible() const { return m_windowIsVisible; }
+ void updatePluginsActiveAndFocusedState();
const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
#elif PLATFORM(WIN)
@@ -307,6 +318,7 @@ public:
#endif
bool windowIsFocused() const;
+ bool windowAndWebPageAreFocused() const;
void installPageOverlay(PassRefPtr<PageOverlay>);
void uninstallPageOverlay(PageOverlay*, bool fadeOut);
bool hasPageOverlay() const { return m_pageOverlay; }
@@ -320,7 +332,7 @@ public:
static const WebEvent* currentEvent();
FindController& findController() { return m_findController; }
-#if PLATFORM(QT)
+#if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
TapHighlightController& tapHighlightController() { return m_tapHighlightController; }
#endif
@@ -336,11 +348,14 @@ public:
void setFixedVisibleContentRect(const WebCore::IntRect&);
void setResizesToContentsUsingLayoutSize(const WebCore::IntSize&);
void resizeToContentsIfNeeded();
+ void sendViewportAttributesChanged();
void setViewportSize(const WebCore::IntSize&);
WebCore::IntSize viewportSize() const { return m_viewportSize; }
#endif
+#if ENABLE(CONTEXT_MENUS)
WebContextMenu* contextMenu();
+#endif
bool hasLocalDataForURL(const WebCore::KURL&);
String cachedResponseMIMETypeForURL(const WebCore::KURL&);
@@ -394,8 +409,9 @@ public:
void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
- void writeSelectionToPasteboard(const WTF::String& pasteboardName, const WTF::Vector<WTF::String>& pasteboardTypes, bool& result);
void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
+ void getStringSelectionForPasteboard(WTF::String& stringValue);
+ void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
bool performNonEditingBehaviorForSelector(const String&);
@@ -439,11 +455,12 @@ public:
#elif PLATFORM(QT) || PLATFORM(GTK)
void performDragControllerAction(uint64_t action, WebCore::DragData);
#else
- void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags, const SandboxExtension::Handle&);
+ void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
#endif
void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
void willPerformLoadDragDestinationAction();
+ void mayPerformUploadDragDestinationAction();
void beginPrinting(uint64_t frameID, const PrintInfo&);
void endPrinting();
@@ -482,7 +499,7 @@ public:
void unmarkAllBadGrammar();
#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
- void handleCorrectionPanelResult(const String&);
+ void handleAlternativeTextUIResult(const String&);
#endif
// For testing purpose.
@@ -491,7 +508,9 @@ public:
void simulateMouseMotion(WebCore::IntPoint, double time);
String viewportConfigurationAsText(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight);
+#if ENABLE(CONTEXT_MENUS)
void contextMenuShowing() { m_isShowingContextMenu = true; }
+#endif
#if PLATFORM(QT)
void registerApplicationScheme(const String& scheme);
@@ -507,7 +526,11 @@ public:
void recomputeShortCircuitHorizontalWheelEventsState();
bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }
-
+
+#if ENABLE(PAGE_VISIBILITY_API)
+ void setVisibilityState(int visibilityState, bool isInitialState);
+#endif
+
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
@@ -540,6 +563,7 @@ private:
void loadHTMLString(const String& htmlString, const String& baseURL);
void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
void loadPlainTextString(const String&);
+ void loadWebArchiveData(const CoreIPC::DataReference&);
void linkClicked(const String& url, const WebMouseEvent&);
void reload(bool reloadFromOrigin, const SandboxExtension::Handle&);
void goForward(uint64_t);
@@ -563,10 +587,12 @@ private:
void touchEvent(const WebTouchEvent&);
void touchEventSyncForTesting(const WebTouchEvent&, bool& handled);
#if PLATFORM(QT)
- void highlightPotentialActivation(const WebCore::IntPoint&);
+ void highlightPotentialActivation(const WebCore::IntPoint&, const WebCore::IntSize& area);
#endif
#endif
+#if ENABLE(CONTEXT_MENUS)
void contextMenuHidden() { m_isShowingContextMenu = false; }
+#endif
static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
static void logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
@@ -610,6 +636,11 @@ private:
void setWindowIsVisible(bool windowIsVisible);
void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
+
+ RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
+ void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
+ void drawRectToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
+ void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
#endif
void unapplyEditCommand(uint64_t commandID);
@@ -621,7 +652,7 @@ private:
void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
#if PLATFORM(QT)
- void findZoomableAreaForPoint(const WebCore::IntPoint&);
+ void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
#endif
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
@@ -698,6 +729,9 @@ private:
// All plug-in views on this web page.
HashSet<PluginView*> m_pluginViews;
+ // The layer hosting mode.
+ LayerHostingMode m_layerHostingMode;
+
RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
@@ -717,7 +751,9 @@ private:
WebCore::IntSize m_windowResizerSize;
+#if ENABLE(CONTEXT_MENUS)
InjectedBundlePageContextMenuClient m_contextMenuClient;
+#endif
InjectedBundlePageEditorClient m_editorClient;
InjectedBundlePageFormClient m_formClient;
InjectedBundlePageLoaderClient m_loaderClient;
@@ -733,7 +769,7 @@ private:
#endif
FindController m_findController;
-#if PLATFORM(QT)
+#if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
TapHighlightController m_tapHighlightController;
#endif
RefPtr<PageOverlay> m_pageOverlay;
@@ -747,7 +783,9 @@ private:
RefPtr<WebFullScreenManager> m_fullScreenManager;
#endif
RefPtr<WebPopupMenu> m_activePopupMenu;
+#if ENABLE(CONTEXT_MENUS)
RefPtr<WebContextMenu> m_contextMenu;
+#endif
RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
@@ -764,6 +802,7 @@ private:
uint64_t m_pageID;
RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
+ Vector<RefPtr<SandboxExtension> > m_pendingDropExtensionsForFileUpload;
bool m_canRunBeforeUnloadConfirmPanel;
@@ -777,7 +816,9 @@ private:
unsigned m_cachedPageCount;
+#if ENABLE(CONTEXT_MENUS)
bool m_isShowingContextMenu;
+#endif
bool m_willGoToBackForwardItemCallbackEnabled;