WinCairo build fails to link.
[WebKit-https.git] / Source / WebKit / chromium / src / WebPagePopupImpl.h
index 3b776f1..cf505d8 100644 (file)
@@ -37,6 +37,7 @@
 #include "PageWidgetDelegate.h"
 #include "WebPagePopup.h"
 #include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
 
 namespace WebCore {
 class Page;
@@ -51,23 +52,25 @@ class WebViewImpl;
 
 class WebPagePopupImpl : public WebPagePopup,
                          public PageWidgetEventHandler,
-                         public WebCore::PagePopup {
+                         public WebCore::PagePopup,
+                         public RefCounted<WebPagePopupImpl> {
     WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
     WTF_MAKE_FAST_ALLOCATED;
 
 public:
-    bool init(WebViewImpl*, WebCore::PagePopupClient*, const WebCore::IntRect& originBoundsInRootView);
+    virtual ~WebPagePopupImpl();
+    bool initialize(WebViewImpl*, WebCore::PagePopupClient*, const WebCore::IntRect& originBoundsInRootView);
     bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&);
     void closePopup();
     WebWidgetClient* widgetClient() const { return m_widgetClient; }
+    bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupClient == other->m_popupClient; }
 
 private:
     // WebWidget functions
     virtual WebSize size() OVERRIDE;
     virtual void animate(double) OVERRIDE;
-    virtual void composite(bool) OVERRIDE;
     virtual void layout() OVERRIDE;
-    virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
+    virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE;
     virtual void resize(const WebSize&) OVERRIDE;
     virtual void close() OVERRIDE;
     virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
@@ -81,8 +84,8 @@ private:
 #endif
 
     explicit WebPagePopupImpl(WebWidgetClient*);
-    virtual ~WebPagePopupImpl();
-    bool initPage();
+    bool initializePage();
+    void destroyPage();
 
     WebWidgetClient* m_widgetClient;
     WebRect m_windowRectInScreen;
@@ -90,6 +93,7 @@ private:
     OwnPtr<WebCore::Page> m_page;
     OwnPtr<PagePopupChromeClient> m_chromeClient;
     WebCore::PagePopupClient* m_popupClient;
+    bool m_closing;
 
     friend class WebPagePopup;
     friend class PagePopupChromeClient;