DOMApplicationCache.h [plain text]
#ifndef DOMApplicationCache_h
#define DOMApplicationCache_h
#include "ApplicationCacheHost.h"
#include "DOMWindowProperty.h"
#include "EventTarget.h"
#include "ScriptWrappable.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/AtomicStringHash.h>
namespace WebCore {
class Frame;
class URL;
class DOMApplicationCache final : public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
public:
static Ref<DOMApplicationCache> create(Frame* frame) { return adoptRef(*new DOMApplicationCache(frame)); }
virtual ~DOMApplicationCache() { ASSERT(!m_frame); }
void disconnectFrameForDocumentSuspension() override;
void reconnectFrameFromDocumentSuspension(Frame*) override;
void willDestroyGlobalObjectInFrame() override;
unsigned short status() const;
void update(ExceptionCode&);
void swapCache(ExceptionCode&);
void abort();
using RefCounted<DOMApplicationCache>::ref;
using RefCounted<DOMApplicationCache>::deref;
EventTargetInterface eventTargetInterface() const override { return DOMApplicationCacheEventTargetInterfaceType; }
ScriptExecutionContext* scriptExecutionContext() const override;
static const AtomicString& toEventType(ApplicationCacheHost::EventID id);
private:
explicit DOMApplicationCache(Frame*);
void refEventTarget() override { ref(); }
void derefEventTarget() override { deref(); }
ApplicationCacheHost* applicationCacheHost() const;
};
}
#endif // DOMApplicationCache_h