diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/loader/appcache/DOMApplicationCache.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/loader/appcache/DOMApplicationCache.h')
-rw-r--r-- | Source/WebCore/loader/appcache/DOMApplicationCache.h | 61 |
1 files changed, 18 insertions, 43 deletions
diff --git a/Source/WebCore/loader/appcache/DOMApplicationCache.h b/Source/WebCore/loader/appcache/DOMApplicationCache.h index 910cb7502..cf6d2a9d9 100644 --- a/Source/WebCore/loader/appcache/DOMApplicationCache.h +++ b/Source/WebCore/loader/appcache/DOMApplicationCache.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. + * Copyright (C) 2008-2017 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,68 +23,43 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DOMApplicationCache_h -#define DOMApplicationCache_h +#pragma once -#include "ApplicationCacheHost.h" #include "DOMWindowProperty.h" -#include "EventNames.h" #include "EventTarget.h" -#include "ScriptWrappable.h" -#include <wtf/Forward.h> -#include <wtf/HashMap.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/Vector.h> -#include <wtf/text/AtomicStringHash.h> namespace WebCore { +class ApplicationCacheHost; class Frame; -class URL; -class DOMApplicationCache final : public ScriptWrappable, public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty { +class DOMApplicationCache final : public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty { public: - static PassRefPtr<DOMApplicationCache> create(Frame* frame) { return adoptRef(new DOMApplicationCache(frame)); } + static Ref<DOMApplicationCache> create(Frame& frame) { return adoptRef(*new DOMApplicationCache(frame)); } virtual ~DOMApplicationCache() { ASSERT(!m_frame); } - virtual void disconnectFrameForPageCache() override; - virtual void reconnectFrameFromPageCache(Frame*) override; - virtual void willDestroyGlobalObjectInFrame() override; - unsigned short status() const; - void update(ExceptionCode&); - void swapCache(ExceptionCode&); + ExceptionOr<void> update(); + ExceptionOr<void> swapCache(); void abort(); - using RefCounted<DOMApplicationCache>::ref; - using RefCounted<DOMApplicationCache>::deref; - - // Explicitly named attribute event listener helpers - - DEFINE_ATTRIBUTE_EVENT_LISTENER(checking); - DEFINE_ATTRIBUTE_EVENT_LISTENER(error); - DEFINE_ATTRIBUTE_EVENT_LISTENER(noupdate); - DEFINE_ATTRIBUTE_EVENT_LISTENER(downloading); - DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); - DEFINE_ATTRIBUTE_EVENT_LISTENER(updateready); - DEFINE_ATTRIBUTE_EVENT_LISTENER(cached); - DEFINE_ATTRIBUTE_EVENT_LISTENER(obsolete); + using RefCounted::ref; + using RefCounted::deref; - virtual EventTargetInterface eventTargetInterface() const override { return DOMApplicationCacheEventTargetInterfaceType; } - virtual ScriptExecutionContext* scriptExecutionContext() const override; +private: + explicit DOMApplicationCache(Frame&); - static const AtomicString& toEventType(ApplicationCacheHost::EventID id); + void refEventTarget() final { ref(); } + void derefEventTarget() final { deref(); } -private: - explicit DOMApplicationCache(Frame*); + EventTargetInterface eventTargetInterface() const final { return DOMApplicationCacheEventTargetInterfaceType; } + ScriptExecutionContext* scriptExecutionContext() const final; - virtual void refEventTarget() override { ref(); } - virtual void derefEventTarget() override { deref(); } + void disconnectFrameForDocumentSuspension() final; + void reconnectFrameFromDocumentSuspension(Frame*) final; + void willDestroyGlobalObjectInFrame() final; ApplicationCacheHost* applicationCacheHost() const; }; } // namespace WebCore - -#endif // DOMApplicationCache_h |