OSDN Git Service

Merge WebKit at r84325: Initial merge by git.
[android-x86/external-webkit.git] / Source / WebKit2 / WebProcess / WebPage / PageOverlay.h
index 6f1f70f..1f61ceb 100644 (file)
@@ -27,6 +27,7 @@
 #define PageOverlay_h
 
 #include "APIObject.h"
+#include "RunLoop.h"
 #include <wtf/PassRefPtr.h>
 
 namespace WebCore {
@@ -65,20 +66,38 @@ public:
     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
     bool mouseEvent(const WebMouseEvent&);
 
+    void startFadeInAnimation();
+    void startFadeOutAnimation();
+
+    float fractionFadedIn() const { return m_fractionFadedIn; }
+
 protected:
     explicit PageOverlay(Client*);
 
-    WebPage* webPage() const { return m_webPage; }
-
 private:
     // APIObject
     virtual Type type() const { return APIType; }
 
     WebCore::IntRect bounds() const;
 
-    Client* m_client;
+    void startFadeAnimation();
+    void fadeAnimationTimerFired();
 
+    Client* m_client;
     WebPage* m_webPage;
+
+    RunLoop::Timer<PageOverlay> m_fadeAnimationTimer;
+    double m_fadeAnimationStartTime;
+    double m_fadeAnimationDuration;
+
+    enum FadeAnimationType {
+        NoAnimation,
+        FadeInAnimation,
+        FadeOutAnimation,
+    };
+
+    FadeAnimationType m_fadeAnimationType;
+    float m_fractionFadedIn;
 };
 
 } // namespace WebKit