Fixed sometimes foucs ring disappear late and is not shown.
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / tizen / FocusRing.h
index dda8e27..802b3dc 100755 (executable)
@@ -32,15 +32,16 @@ class EwkViewImpl;
 
 class FocusRing {
 public:
-    static PassOwnPtr<FocusRing> create(Evas_Object* viewWidget)
+    static PassOwnPtr<FocusRing> create(EwkViewImpl* viewImpl)
     {
-        return adoptPtr(new FocusRing(viewWidget));
+        return adoptPtr(new FocusRing(viewImpl));
     }
     ~FocusRing();
 
-    void setImageDrawing(bool);
+    void setImage(const String&, int, int);
 
-    void requestToShow(const WebCore::IntPoint&);
+    void requestToShow(const WebCore::IntPoint&, bool immediately = false);
+    void requestToHide(bool immediately = false);
 
     void show(const WebCore::IntRect&, const bool includeOnlyImage = false);
     void hide(bool = true);
@@ -54,20 +55,23 @@ private:
     static const int s_showTimerTime = 100;
     static Eina_Bool showTimerCallback(void* data);
 
-    static const int s_imageOuterWidth;
-    static const int s_imageInnerWidth;
+    static const int s_hideTimerTime = 200;
+    static Eina_Bool hideTimerCallback(void* data);
 
 private:
-    FocusRing(Evas_Object* viewWidget);
+    FocusRing(EwkViewImpl* viewImpl);
     void internalShow(bool, const WebCore::IntRect&);
 
-    Evas_Object* m_viewWidget;
     EwkViewImpl* m_viewImpl;
 
     Evas_Object* m_focusRingObject;
-    bool m_isImageDrawing;
+
+    String m_imagePath;
+    int m_imageOuterWidth;
+    int m_imageInnerWidth;
 
     Ecore_Timer* m_showTimer;
+    Ecore_Timer* m_hideTimer;
     WebCore::IntPoint m_position;
 
     WebCore::IntRect m_rect;