| 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 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 | 30 |
| 31 #ifndef DedicatedWorkerGlobalScope_h | 31 #ifndef DedicatedWorkerGlobalScope_h |
| 32 #define DedicatedWorkerGlobalScope_h | 32 #define DedicatedWorkerGlobalScope_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/dom/MessagePort.h" | 35 #include "core/dom/MessagePort.h" |
| 36 #include "core/frame/csp/ContentSecurityPolicy.h" | |
| 37 #include "core/workers/WorkerGlobalScope.h" | 36 #include "core/workers/WorkerGlobalScope.h" |
| 38 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Visitor.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 class DedicatedWorkerThread; | 41 class DedicatedWorkerThread; |
| 43 class WorkerThreadStartupData; | 42 class WorkerThreadStartupData; |
| 44 | 43 |
| 45 class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { | 44 class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { |
| 46 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
| 47 public: | 46 public: |
| 48 typedef WorkerGlobalScope Base; | |
| 49 static DedicatedWorkerGlobalScope* create(DedicatedWorkerThread*, PassOwnPtr
<WorkerThreadStartupData>, double timeOrigin); | 47 static DedicatedWorkerGlobalScope* create(DedicatedWorkerThread*, PassOwnPtr
<WorkerThreadStartupData>, double timeOrigin); |
| 50 ~DedicatedWorkerGlobalScope() override; | 48 ~DedicatedWorkerGlobalScope() override; |
| 51 | 49 |
| 52 bool isDedicatedWorkerGlobalScope() const override { return true; } | 50 bool isDedicatedWorkerGlobalScope() const override { return true; } |
| 53 void countFeature(UseCounter::Feature) const override; | 51 void countFeature(UseCounter::Feature) const override; |
| 54 void countDeprecation(UseCounter::Feature) const override; | 52 void countDeprecation(UseCounter::Feature) const override; |
| 55 | 53 |
| 56 // EventTarget | 54 // EventTarget |
| 57 const AtomicString& interfaceName() const override; | 55 const AtomicString& interfaceName() const override; |
| 58 | 56 |
| 59 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const
MessagePortArray&, ExceptionState&); | 57 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const
MessagePortArray&, ExceptionState&); |
| 60 | 58 |
| 61 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 59 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 62 | 60 |
| 63 DedicatedWorkerThread* thread() const; | 61 DedicatedWorkerThread* thread() const; |
| 64 | 62 |
| 65 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
| 66 | 64 |
| 67 private: | 65 private: |
| 68 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo
rkerThread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, Worke
rClients*); | 66 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo
rkerThread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, Worke
rClients*); |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 } // namespace blink | 69 } // namespace blink |
| 72 | 70 |
| 73 #endif // DedicatedWorkerGlobalScope_h | 71 #endif // DedicatedWorkerGlobalScope_h |
| OLD | NEW |