| 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/CompositorProxyClient.h" | 8 #include "core/dom/CompositorProxyClient.h" |
| 9 #include "core/dom/FrameRequestCallbackCollection.h" | 9 #include "core/dom/FrameRequestCallbackCollection.h" |
| 10 #include "core/dom/MessagePort.h" | 10 #include "core/dom/MessagePort.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 void dispose() override; | 31 void dispose() override; |
| 32 | 32 |
| 33 // EventTarget | 33 // EventTarget |
| 34 const AtomicString& interfaceName() const override; | 34 const AtomicString& interfaceName() const override; |
| 35 | 35 |
| 36 void postMessage(ExecutionContext*, | 36 void postMessage(ExecutionContext*, |
| 37 PassRefPtr<SerializedScriptValue>, | 37 PassRefPtr<SerializedScriptValue>, |
| 38 const MessagePortArray&, | 38 const MessagePortArray&, |
| 39 ExceptionState&); | 39 ExceptionState&); |
| 40 static bool canTransferArrayBuffer() { return true; } |
| 40 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 41 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 41 | 42 |
| 42 int requestAnimationFrame(FrameRequestCallback*); | 43 int requestAnimationFrame(FrameRequestCallback*); |
| 43 void cancelAnimationFrame(int id); | 44 void cancelAnimationFrame(int id); |
| 44 bool executeAnimationFrameCallbacks(double highResTimeMs); | 45 bool executeAnimationFrameCallbacks(double highResTimeMs); |
| 45 | 46 |
| 46 // ExecutionContext: | 47 // ExecutionContext: |
| 47 bool isCompositorWorkerGlobalScope() const override { return true; } | 48 bool isCompositorWorkerGlobalScope() const override { return true; } |
| 48 | 49 |
| 49 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 CompositorWorkerGlobalScope(const KURL&, | 53 CompositorWorkerGlobalScope(const KURL&, |
| 53 const String& userAgent, | 54 const String& userAgent, |
| 54 CompositorWorkerThread*, | 55 CompositorWorkerThread*, |
| 55 double timeOrigin, | 56 double timeOrigin, |
| 56 std::unique_ptr<SecurityOrigin::PrivilegeData>, | 57 std::unique_ptr<SecurityOrigin::PrivilegeData>, |
| 57 WorkerClients*); | 58 WorkerClients*); |
| 58 CompositorWorkerThread* thread() const; | 59 CompositorWorkerThread* thread() const; |
| 59 | 60 |
| 60 bool m_executingAnimationFrameCallbacks; | 61 bool m_executingAnimationFrameCallbacks; |
| 61 FrameRequestCallbackCollection m_callbackCollection; | 62 FrameRequestCallbackCollection m_callbackCollection; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace blink | 65 } // namespace blink |
| 65 | 66 |
| 66 #endif // CompositorWorkerGlobalScope_h | 67 #endif // CompositorWorkerGlobalScope_h |
| OLD | NEW |