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 22 matching lines...) Expand all Loading... |
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 "wtf/Assertions.h" | 36 #include "wtf/Assertions.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class ServiceWorkerThread; | 40 class ServiceWorkerThread; |
41 struct WorkerThreadStartupData; | 41 struct WorkerThreadStartupData; |
42 | 42 |
43 class ServiceWorkerGlobalScope : public WorkerGlobalScope { | 43 class ServiceWorkerGlobalScope FINAL : public WorkerGlobalScope { |
44 public: | 44 public: |
45 static PassRefPtr<ServiceWorkerGlobalScope> create(ServiceWorkerThread*, Pas
sOwnPtr<WorkerThreadStartupData>); | 45 static PassRefPtr<ServiceWorkerGlobalScope> create(ServiceWorkerThread*, Pas
sOwnPtr<WorkerThreadStartupData>); |
46 | 46 |
47 virtual ~ServiceWorkerGlobalScope(); | 47 virtual ~ServiceWorkerGlobalScope(); |
48 virtual bool isServiceWorkerGlobalScope() const OVERRIDE { return true; } | 48 virtual bool isServiceWorkerGlobalScope() const OVERRIDE { return true; } |
49 | 49 |
50 // EventTarget | 50 // EventTarget |
51 virtual const AtomicString& interfaceName() const OVERRIDE; | 51 virtual const AtomicString& interfaceName() const OVERRIDE; |
52 | 52 |
53 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); | 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); |
54 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); | 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); |
55 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); |
56 | 56 |
57 private: | 57 private: |
58 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<WorkerClients>); | 58 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<WorkerClients>); |
59 }; | 59 }; |
60 } | 60 } |
61 | 61 |
62 #endif // ServiceWorkerGlobalScope_h | 62 #endif // ServiceWorkerGlobalScope_h |
OLD | NEW |