OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CompositorWorkerGlobalScope_h |
| 6 #define CompositorWorkerGlobalScope_h |
| 7 |
| 8 #include "core/dom/MessagePort.h" |
| 9 #include "core/workers/WorkerGlobalScope.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class CompositorWorkerThread; |
| 14 class WorkerThreadStartupData; |
| 15 |
| 16 class CompositorWorkerGlobalScope final : public WorkerGlobalScope { |
| 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 public: |
| 19 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor
WorkerThread*, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>, double timeOrigi
n); |
| 20 virtual ~CompositorWorkerGlobalScope(); |
| 21 |
| 22 // EventTarget |
| 23 const AtomicString& interfaceName() const override; |
| 24 |
| 25 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const
MessagePortArray*, ExceptionState&); |
| 26 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 27 |
| 28 void executeCompositorFrameCallbacks(double monotonicTimeNow); |
| 29 |
| 30 // ExecutionContext: |
| 31 bool isCompositorWorkerGlobalScope() const override { return true; } |
| 32 |
| 33 DECLARE_VIRTUAL_TRACE(); |
| 34 |
| 35 protected: |
| 36 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor
WorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<
WorkerClients>); |
| 37 |
| 38 private: |
| 39 CompositorWorkerThread* thread() const; |
| 40 }; |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // CompositorWorkerGlobalScope_h |
OLD | NEW |