| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 16 matching lines...) Expand all Loading... |
| 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 | 30 |
| 31 #ifndef DedicatedWorkerGlobalScope_h | 31 #ifndef DedicatedWorkerGlobalScope_h |
| 32 #define DedicatedWorkerGlobalScope_h | 32 #define DedicatedWorkerGlobalScope_h |
| 33 | 33 |
| 34 #include "core/dom/MessagePort.h" | 34 #include "core/dom/MessagePort.h" |
| 35 #include "core/frame/csp/ContentSecurityPolicy.h" | 35 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 36 #include "core/workers/WorkerGlobalScope.h" | 36 #include "core/workers/WorkerGlobalScope.h" |
| 37 #include "heap/Handle.h" |
| 37 | 38 |
| 38 namespace WebCore { | 39 namespace WebCore { |
| 39 | 40 |
| 40 class DedicatedWorkerThread; | 41 class DedicatedWorkerThread; |
| 41 struct WorkerThreadStartupData; | 42 struct WorkerThreadStartupData; |
| 42 | 43 |
| 43 class DedicatedWorkerGlobalScope FINAL : public WorkerGlobalScope { | 44 class DedicatedWorkerGlobalScope FINAL : public WorkerGlobalScope { |
| 44 public: | 45 public: |
| 45 typedef WorkerGlobalScope Base; | 46 typedef WorkerGlobalScope Base; |
| 46 static PassRefPtr<DedicatedWorkerGlobalScope> create(DedicatedWorkerThread*,
PassOwnPtr<WorkerThreadStartupData>, double timeOrigin); | 47 static PassRefPtrWillBeRawPtr<DedicatedWorkerGlobalScope> create(DedicatedWo
rkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin); |
| 47 virtual ~DedicatedWorkerGlobalScope(); | 48 virtual ~DedicatedWorkerGlobalScope(); |
| 48 | 49 |
| 49 virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; } | 50 virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; } |
| 50 | 51 |
| 51 // Overridden to allow us to check our pending activity after executing impo
rted script. | 52 // Overridden to allow us to check our pending activity after executing impo
rted script. |
| 52 virtual void importScripts(const Vector<String>& urls, ExceptionState&) OVER
RIDE; | 53 virtual void importScripts(const Vector<String>& urls, ExceptionState&) OVER
RIDE; |
| 53 | 54 |
| 54 // EventTarget | 55 // EventTarget |
| 55 virtual const AtomicString& interfaceName() const OVERRIDE; | 56 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 56 | 57 |
| 57 void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*,
ExceptionState&); | 58 void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*,
ExceptionState&); |
| 58 | 59 |
| 59 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 60 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 60 | 61 |
| 61 DedicatedWorkerThread* thread(); | 62 DedicatedWorkerThread* thread(); |
| 62 | 63 |
| 64 virtual void trace(Visitor*) OVERRIDE; |
| 65 |
| 63 private: | 66 private: |
| 64 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo
rkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>); | 67 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo
rkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>); |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 } // namespace WebCore | 70 } // namespace WebCore |
| 68 | 71 |
| 69 #endif // DedicatedWorkerGlobalScope_h | 72 #endif // DedicatedWorkerGlobalScope_h |
| OLD | NEW |