Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / xml / XMLHttpRequestProgressEventThrottle.h
index 06681eb..6479784 100644 (file)
@@ -28,6 +28,7 @@
 #define XMLHttpRequestProgressEventThrottle_h
 
 #include "platform/Timer.h"
+#include "platform/heap/Handle.h"
 #include "wtf/PassRefPtr.h"
 #include "wtf/Vector.h"
 #include "wtf/text/AtomicString.h"
@@ -46,18 +47,21 @@ enum ProgressEventAction {
 // This implements the XHR2 progress event dispatching: "dispatch a progress event called progress
 // about every 50ms or for every byte received, whichever is least frequent".
 class XMLHttpRequestProgressEventThrottle FINAL : public TimerBase {
+    DISALLOW_ALLOCATION();
 public:
     explicit XMLHttpRequestProgressEventThrottle(EventTarget*);
     virtual ~XMLHttpRequestProgressEventThrottle();
 
     void dispatchProgressEvent(bool lengthComputable, unsigned long long loaded, unsigned long long total);
-    void dispatchReadyStateChangeEvent(PassRefPtr<Event>, ProgressEventAction = DoNotFlushProgressEvent);
-    void dispatchEvent(PassRefPtr<Event>);
+    void dispatchReadyStateChangeEvent(PassRefPtrWillBeRawPtr<Event>, ProgressEventAction = DoNotFlushProgressEvent);
+    void dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
     void dispatchEventAndLoadEnd(const AtomicString&, bool, unsigned long long, unsigned long long);
 
     void suspend();
     void resume();
 
+    void trace(Visitor*);
+
 private:
     static const double minimumProgressEventDispatchingIntervalInSeconds;
 
@@ -76,8 +80,8 @@ private:
     unsigned long long m_total;
 
     bool m_deferEvents;
-    RefPtr<Event> m_deferredProgressEvent;
-    Vector<RefPtr<Event> > m_deferredEvents;
+    RefPtrWillBeMember<Event> m_deferredProgressEvent;
+    WillBeHeapVector<RefPtrWillBeMember<Event> > m_deferredEvents;
     Timer<XMLHttpRequestProgressEventThrottle> m_dispatchDeferredEventsTimer;
 };