diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.h')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/WebPage.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h index 8ce6405..8e4e71c 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.h +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h @@ -46,6 +46,7 @@ #include <WebCore/Editor.h> #include <WebCore/FrameLoaderTypes.h> #include <WebCore/IntRect.h> +#include <WebCore/ScrollTypes.h> #include <WebCore/WebCoreKeyboardUIMode.h> #include <wtf/HashMap.h> #include <wtf/OwnPtr.h> @@ -61,6 +62,8 @@ #include "DictionaryPopupInfo.h" #include <wtf/RetainPtr.h> OBJC_CLASS AccessibilityWebPageObject; +OBJC_CLASS NSDictionary; +OBJC_CLASS NSObject; #endif namespace CoreIPC { @@ -77,6 +80,7 @@ namespace WebCore { class Range; class ResourceRequest; class SharedBuffer; + class VisibleSelection; } namespace WebKit { @@ -90,6 +94,7 @@ class WebContextMenu; class WebContextMenuItemData; class WebEvent; class WebFrame; +class WebFullScreenManager; class WebImage; class WebInspector; class WebKeyboardEvent; @@ -137,10 +142,16 @@ public: void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset); + void scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity); + #if ENABLE(INSPECTOR) WebInspector* inspector(); #endif +#if ENABLE(FULLSCREEN_API) + WebFullScreenManager* fullScreenManager(); +#endif + // -- Called by the DrawingArea. // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial? void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&); @@ -229,15 +240,16 @@ public: bool windowIsVisible() const { return m_windowIsVisible; } const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; } const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; } - bool windowIsFocused() const; bool interceptEditingKeyboardEvent(WebCore::KeyboardEvent*, bool); #elif PLATFORM(WIN) HWND nativeWindow() const { return m_nativeWindow; } #endif + bool windowIsFocused() const; void installPageOverlay(PassRefPtr<PageOverlay>); void uninstallPageOverlay(PageOverlay*); bool hasPageOverlay() const { return m_pageOverlay; } + WebCore::IntRect windowToScreen(const WebCore::IntRect&); PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions); PassRefPtr<WebImage> snapshotInDocumentCoordinates(const WebCore::IntRect&, ImageOptions); @@ -250,7 +262,7 @@ public: void pageDidScroll(); #if ENABLE(TILED_BACKING_STORE) - void pageDidRequestScroll(const WebCore::IntSize& delta); + void pageDidRequestScroll(const WebCore::IntPoint&); void setActualVisibleContentRect(const WebCore::IntRect&); bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); } @@ -297,6 +309,7 @@ public: void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result); void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect); void writeSelectionToPasteboard(const WTF::String& pasteboardName, const WTF::Vector<WTF::String>& pasteboardTypes, bool& result); + void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result); #elif PLATFORM(WIN) void confirmComposition(const String& compositionString); void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition); @@ -309,7 +322,7 @@ public: void dummy(bool&); #if PLATFORM(MAC) - void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*); + void performDictionaryLookupForSelection(DictionaryPopupInfo::Type, WebCore::Frame*, const WebCore::VisibleSelection&); bool isSpeaking(); void speak(const String&); @@ -346,10 +359,20 @@ public: void runModal(); + float userSpaceScaleFactor() const { return m_userSpaceScaleFactor; } + void setMemoryCacheMessagesEnabled(bool); void forceRepaintWithoutCallback(); +#if PLATFORM(MAC) + void setDragSource(NSObject *); +#endif + +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) + void handleCorrectionPanelResult(const String&); +#endif + private: WebPage(uint64_t pageID, const WebPageCreationParameters&); @@ -398,6 +421,9 @@ private: void touchEvent(const WebTouchEvent&); #endif + static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity); + static void logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity); + uint64_t restoreSession(const SessionState&); void restoreSessionAndNavigateToCurrentItem(const SessionState&, const SandboxExtension::Handle&); @@ -429,6 +455,7 @@ private: #if PLATFORM(MAC) void performDictionaryLookupAtLocation(const WebCore::FloatPoint&); + void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*, NSDictionary *options); void setWindowIsVisible(bool windowIsVisible); void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates); @@ -473,6 +500,10 @@ private: void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&); #endif + void platformDragEnded(); + + static bool platformCanHandleRequest(const WebCore::ResourceRequest&); + OwnPtr<WebCore::Page> m_page; RefPtr<WebFrame> m_mainFrame; RefPtr<InjectedBundleBackForwardList> m_backForwardList; @@ -512,6 +543,8 @@ private: HashSet<PluginView*> m_pluginViews; RetainPtr<AccessibilityWebPageObject> m_mockAccessibilityElement; + + RetainPtr<NSObject> m_dragSource; #elif PLATFORM(WIN) // Our view's window (in the UI process). HWND m_nativeWindow; @@ -539,6 +572,9 @@ private: #if ENABLE(INSPECTOR) RefPtr<WebInspector> m_inspector; #endif +#if ENABLE(FULLSCREEN_API) + RefPtr<WebFullScreenManager> m_fullScreenManager; +#endif RefPtr<WebPopupMenu> m_activePopupMenu; RefPtr<WebContextMenu> m_contextMenu; RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener; @@ -554,6 +590,8 @@ private: bool m_canRunModal; bool m_isRunningModal; + float m_userSpaceScaleFactor; + bool m_cachedMainFrameIsPinnedToLeftSide; bool m_cachedMainFrameIsPinnedToRightSide; }; |