diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebCore/page/Chrome.h | |
parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore/page/Chrome.h')
-rw-r--r-- | Source/WebCore/page/Chrome.h | 103 |
1 files changed, 54 insertions, 49 deletions
diff --git a/Source/WebCore/page/Chrome.h b/Source/WebCore/page/Chrome.h index f3de5ba0e..6272dbc17 100644 --- a/Source/WebCore/page/Chrome.h +++ b/Source/WebCore/page/Chrome.h @@ -28,7 +28,7 @@ #include <wtf/Forward.h> #include <wtf/RefPtr.h> -#if PLATFORM(MAC) +#if PLATFORM(COCOA) #ifndef __OBJC__ class NSView; #endif @@ -44,12 +44,13 @@ class DateTimeChooserClient; class FileChooser; class FileIconLoader; class FloatRect; +class Element; class Frame; class Geolocation; class HitTestResult; +class IntPoint; class IntRect; class NavigationAction; -class Node; class Page; class PopupMenu; class PopupMenuClient; @@ -63,41 +64,46 @@ struct WindowFeatures; class Chrome : public HostWindow { public: - ~Chrome(); + Chrome(Page&, ChromeClient&); + virtual ~Chrome(); - static PassOwnPtr<Chrome> create(Page*, ChromeClient*); - - ChromeClient* client() { return m_client; } + ChromeClient& client() { return m_client; } // HostWindow methods. - virtual void invalidateRootView(const IntRect&, bool) OVERRIDE; - virtual void invalidateContentsAndRootView(const IntRect&, bool) OVERRIDE; - virtual void invalidateContentsForSlowScroll(const IntRect&, bool) OVERRIDE; - virtual void scroll(const IntSize&, const IntRect&, const IntRect&) OVERRIDE; -#if USE(TILED_BACKING_STORE) - virtual void delegatedScrollRequested(const IntPoint& scrollPoint) OVERRIDE; + virtual void invalidateRootView(const IntRect&) override; + virtual void invalidateContentsAndRootView(const IntRect&) override; + virtual void invalidateContentsForSlowScroll(const IntRect&) override; + virtual void scroll(const IntSize&, const IntRect&, const IntRect&) override; +#if USE(COORDINATED_GRAPHICS) + virtual void delegatedScrollRequested(const IntPoint& scrollPoint) override; +#endif + virtual IntPoint screenToRootView(const IntPoint&) const override; + virtual IntRect rootViewToScreen(const IntRect&) const override; +#if PLATFORM(IOS) + virtual IntPoint accessibilityScreenToRootView(const IntPoint&) const override; + virtual IntRect rootViewToAccessibilityScreen(const IntRect&) const override; #endif - virtual IntPoint screenToRootView(const IntPoint&) const OVERRIDE; - virtual IntRect rootViewToScreen(const IntRect&) const OVERRIDE; - virtual PlatformPageClient platformPageClient() const OVERRIDE; - virtual void scrollbarsModeDidChange() const OVERRIDE; - virtual void setCursor(const Cursor&) OVERRIDE; - virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE; + virtual PlatformPageClient platformPageClient() const override; + virtual void scrollbarsModeDidChange() const override; + virtual void setCursor(const Cursor&) override; + virtual void setCursorHiddenUntilMouseMoves(bool) override; #if ENABLE(REQUEST_ANIMATION_FRAME) - virtual void scheduleAnimation() OVERRIDE; + virtual void scheduleAnimation() override; #endif - virtual PlatformDisplayID displayID() const OVERRIDE; - virtual void windowScreenDidChange(PlatformDisplayID) OVERRIDE; + virtual PlatformDisplayID displayID() const override; + virtual void windowScreenDidChange(PlatformDisplayID) override; + + FloatSize screenSize() const override; + FloatSize availableScreenSize() const override; void scrollRectIntoView(const IntRect&) const; void contentsSizeChanged(Frame*, const IntSize&) const; - void layoutUpdated(Frame*) const; - void setWindowRect(const FloatRect&) const; - FloatRect windowRect() const; + WEBCORE_EXPORT void setWindowRect(const FloatRect&) const; + WEBCORE_EXPORT FloatRect windowRect() const; FloatRect pageRect() const; @@ -107,14 +113,13 @@ public: bool canTakeFocus(FocusDirection) const; void takeFocus(FocusDirection) const; - void focusedNodeChanged(Node*) const; + void focusedElementChanged(Element*) const; void focusedFrameChanged(Frame*) const; - Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) const; - void show() const; + WEBCORE_EXPORT Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) const; + WEBCORE_EXPORT void show() const; bool canRunModal() const; - bool canRunModalNow() const; void runModal() const; void setToolbarsVisible(bool) const; @@ -139,58 +144,58 @@ public: void runJavaScriptAlert(Frame*, const String&); bool runJavaScriptConfirm(Frame*, const String&); bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result); - void setStatusbarText(Frame*, const String&); - bool shouldInterruptJavaScript(); - - IntRect windowResizerRect() const; + WEBCORE_EXPORT void setStatusbarText(Frame*, const String&); void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); void setToolTip(const HitTestResult&); - void print(Frame*); + WEBCORE_EXPORT void print(Frame*); - void enableSuddenTermination(); - void disableSuddenTermination(); + WEBCORE_EXPORT void enableSuddenTermination(); + WEBCORE_EXPORT void disableSuddenTermination(); #if ENABLE(INPUT_TYPE_COLOR) - PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color& initialColor); -#endif -#if ENABLE(DATE_AND_TIME_INPUT_TYPES) - PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const DateTimeChooserParameters&); + std::unique_ptr<ColorChooser> createColorChooser(ColorChooserClient*, const Color& initialColor); #endif void runOpenPanel(Frame*, PassRefPtr<FileChooser>); void loadIconForFiles(const Vector<String>&, FileIconLoader*); -#if ENABLE(DIRECTORY_UPLOAD) - void enumerateChosenDirectory(FileChooser*); -#endif void dispatchViewportPropertiesDidChange(const ViewportArguments&) const; bool requiresFullscreenForVideoPlayback(); -#if PLATFORM(MAC) - void focusNSView(NSView*); +#if PLATFORM(COCOA) + WEBCORE_EXPORT void focusNSView(NSView*); #endif bool selectItemWritingDirectionIsNatural(); bool selectItemAlignmentFollowsMenuWritingDirection(); bool hasOpenedPopup() const; - PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; - PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; + RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; + RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; + +#if PLATFORM(IOS) + // FIXME: Can we come up with a better name for this setter? + void setDispatchViewportDataDidChangeSuppressed(bool dispatchViewportDataDidChangeSuppressed) { m_isDispatchViewportDataDidChangeSuppressed = dispatchViewportDataDidChangeSuppressed; } + + void didReceiveDocType(Frame*); +#endif void registerPopupOpeningObserver(PopupOpeningObserver*); void unregisterPopupOpeningObserver(PopupOpeningObserver*); private: - Chrome(Page*, ChromeClient*); void notifyPopupOpeningObservers() const; - Page* m_page; - ChromeClient* m_client; + Page& m_page; + ChromeClient& m_client; PlatformDisplayID m_displayID; Vector<PopupOpeningObserver*> m_popupOpeningObservers; +#if PLATFORM(IOS) + bool m_isDispatchViewportDataDidChangeSuppressed; +#endif }; } |