#ifndef ProgressEvent_h
#define ProgressEvent_h
#include "core/events/Event.h"
namespace WebCore {
struct ProgressEventInit : public EventInit {
ProgressEventInit();
bool lengthComputable;
unsigned long long loaded;
unsigned long long total;
};
class ProgressEvent : public Event {
public:
static PassRefPtrWillBeRawPtr<ProgressEvent> create()
{
return adoptRefWillBeNoop(new ProgressEvent);
}
static PassRefPtrWillBeRawPtr<ProgressEvent> create(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total)
{
return adoptRefWillBeNoop(new ProgressEvent(type, lengthComputable, loaded, total));
}
static PassRefPtrWillBeRawPtr<ProgressEvent> create(const AtomicString& type, const ProgressEventInit& initializer)
{
return adoptRefWillBeNoop(new ProgressEvent(type, initializer));
}
bool lengthComputable() const { return m_lengthComputable; }
unsigned long long loaded() const { return m_loaded; }
unsigned long long total() const { return m_total; }
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual void trace(Visitor*) OVERRIDE;
protected:
ProgressEvent();
ProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total);
ProgressEvent(const AtomicString&, const ProgressEventInit&);
private:
bool m_lengthComputable;
unsigned long long m_loaded;
unsigned long long m_total;
};
}
#endif