OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CompositorWorkerGlobalScope_h | 5 #ifndef CompositorWorkerGlobalScope_h |
6 #define CompositorWorkerGlobalScope_h | 6 #define CompositorWorkerGlobalScope_h |
7 | 7 |
8 #include "core/dom/MessagePort.h" | 8 #include "core/dom/MessagePort.h" |
9 #include "core/workers/WorkerGlobalScope.h" | 9 #include "core/workers/WorkerGlobalScope.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class CompositorWorkerThread; | 13 class CompositorWorkerThread; |
14 class WorkerThreadStartupData; | 14 class WorkerThreadStartupData; |
15 | 15 |
16 class CompositorWorkerGlobalScope final : public WorkerGlobalScope { | 16 class CompositorWorkerGlobalScope final : public WorkerGlobalScope { |
17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
18 public: | 18 public: |
19 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor
WorkerThread*, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>, double timeOrigi
n); | 19 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor
WorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin); |
20 virtual ~CompositorWorkerGlobalScope(); | 20 virtual ~CompositorWorkerGlobalScope(); |
21 | 21 |
22 // EventTarget | 22 // EventTarget |
23 const AtomicString& interfaceName() const override; | 23 const AtomicString& interfaceName() const override; |
24 | 24 |
25 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const
MessagePortArray*, ExceptionState&); | 25 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const
MessagePortArray*, ExceptionState&); |
26 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 26 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
27 | 27 |
28 void executeCompositorFrameCallbacks(double monotonicTimeNow); | 28 void executeCompositorFrameCallbacks(double monotonicTimeNow); |
29 | 29 |
30 // ExecutionContext: | 30 // ExecutionContext: |
31 bool isCompositorWorkerGlobalScope() const override { return true; } | 31 bool isCompositorWorkerGlobalScope() const override { return true; } |
32 | 32 |
33 private: | 33 private: |
34 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor
WorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<
WorkerClients>); | 34 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor
WorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<
WorkerClients>); |
35 CompositorWorkerThread* thread() const; | 35 CompositorWorkerThread* thread() const; |
36 }; | 36 }; |
37 | 37 |
38 } // namespace blink | 38 } // namespace blink |
39 | 39 |
40 #endif // CompositorWorkerGlobalScope_h | 40 #endif // CompositorWorkerGlobalScope_h |
OLD | NEW |