| 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 CompositorWorkerThread_h | 5 #ifndef CompositorWorkerThread_h |
| 6 #define CompositorWorkerThread_h | 6 #define CompositorWorkerThread_h |
| 7 | 7 |
| 8 #include "modules/ModulesExport.h" | 8 #include "modules/ModulesExport.h" |
| 9 #include "modules/compositorworker/AbstractAnimationWorkletThread.h" | 9 #include "modules/compositorworker/AbstractAnimationWorkletThread.h" |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class InProcessWorkerObjectProxy; | 14 class InProcessWorkerObjectProxy; |
| 15 | 15 |
| 16 class MODULES_EXPORT CompositorWorkerThread final | 16 class MODULES_EXPORT CompositorWorkerThread final |
| 17 : public AbstractAnimationWorkletThread { | 17 : public AbstractAnimationWorkletThread { |
| 18 public: | 18 public: |
| 19 static std::unique_ptr<CompositorWorkerThread> Create( | 19 static std::unique_ptr<CompositorWorkerThread> Create( |
| 20 PassRefPtr<WorkerLoaderProxy>, | 20 ThreadableLoadingContext*, |
| 21 InProcessWorkerObjectProxy&, | 21 InProcessWorkerObjectProxy&, |
| 22 double time_origin); | 22 double time_origin); |
| 23 ~CompositorWorkerThread() override; | 23 ~CompositorWorkerThread() override; |
| 24 | 24 |
| 25 InProcessWorkerObjectProxy& WorkerObjectProxy() const { | 25 InProcessWorkerObjectProxy& WorkerObjectProxy() const { |
| 26 return worker_object_proxy_; | 26 return worker_object_proxy_; |
| 27 } | 27 } |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 WorkerOrWorkletGlobalScope* CreateWorkerGlobalScope( | 30 WorkerOrWorkletGlobalScope* CreateWorkerGlobalScope( |
| 31 std::unique_ptr<WorkerThreadStartupData>) override; | 31 std::unique_ptr<WorkerThreadStartupData>) override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, | 34 CompositorWorkerThread(ThreadableLoadingContext*, |
| 35 InProcessWorkerObjectProxy&, | 35 InProcessWorkerObjectProxy&, |
| 36 double time_origin); | 36 double time_origin); |
| 37 | 37 |
| 38 InProcessWorkerObjectProxy& worker_object_proxy_; | 38 InProcessWorkerObjectProxy& worker_object_proxy_; |
| 39 double time_origin_; | 39 double time_origin_; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace blink | 42 } // namespace blink |
| 43 | 43 |
| 44 #endif // CompositorWorkerThread_h | 44 #endif // CompositorWorkerThread_h |
| OLD | NEW |