OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 #ifndef ServiceWorkerGlobalScope_h | 30 #ifndef ServiceWorkerGlobalScope_h |
31 #define ServiceWorkerGlobalScope_h | 31 #define ServiceWorkerGlobalScope_h |
32 | 32 |
33 #include "bindings/v8/ScriptPromiseResolver.h" | 33 #include "bindings/v8/ScriptPromiseResolver.h" |
34 #include "core/dom/Promise.h" | 34 #include "core/dom/Promise.h" |
35 #include "core/workers/WorkerGlobalScope.h" | 35 #include "core/workers/WorkerGlobalScope.h" |
| 36 #include "heap/Handle.h" |
36 #include "wtf/Assertions.h" | 37 #include "wtf/Assertions.h" |
37 | 38 |
38 namespace WebCore { | 39 namespace WebCore { |
39 | 40 |
40 class ServiceWorkerThread; | 41 class ServiceWorkerThread; |
41 struct WorkerThreadStartupData; | 42 struct WorkerThreadStartupData; |
42 | 43 |
43 class ServiceWorkerGlobalScope FINAL : public WorkerGlobalScope { | 44 class ServiceWorkerGlobalScope FINAL : public WorkerGlobalScope { |
44 public: | 45 public: |
45 static PassRefPtr<ServiceWorkerGlobalScope> create(ServiceWorkerThread*, Pas
sOwnPtr<WorkerThreadStartupData>); | 46 static PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> create(ServiceWorker
Thread*, PassOwnPtr<WorkerThreadStartupData>); |
46 | 47 |
47 virtual ~ServiceWorkerGlobalScope(); | 48 virtual ~ServiceWorkerGlobalScope(); |
48 virtual bool isServiceWorkerGlobalScope() const OVERRIDE { return true; } | 49 virtual bool isServiceWorkerGlobalScope() const OVERRIDE { return true; } |
49 | 50 |
50 // EventTarget | 51 // EventTarget |
51 virtual const AtomicString& interfaceName() const OVERRIDE; | 52 virtual const AtomicString& interfaceName() const OVERRIDE; |
52 | 53 |
53 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); | 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); |
54 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); |
55 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); | 56 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); |
56 | 57 |
| 58 virtual void trace(Visitor*) OVERRIDE; |
| 59 |
57 private: | 60 private: |
58 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<WorkerClients>); | 61 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<WorkerClients>); |
59 }; | 62 }; |
60 } | 63 } |
61 | 64 |
62 #endif // ServiceWorkerGlobalScope_h | 65 #endif // ServiceWorkerGlobalScope_h |
OLD | NEW |