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 PassRefPtr<WorkerLoaderProxy>, |
21 InProcessWorkerObjectProxy&, | 21 InProcessWorkerObjectProxy&, |
22 ParentFrameTaskRunners*, | |
23 double timeOrigin); | 22 double timeOrigin); |
24 ~CompositorWorkerThread() override; | 23 ~CompositorWorkerThread() override; |
25 | 24 |
26 InProcessWorkerObjectProxy& workerObjectProxy() const { | 25 InProcessWorkerObjectProxy& workerObjectProxy() const { |
27 return m_workerObjectProxy; | 26 return m_workerObjectProxy; |
28 } | 27 } |
29 | 28 |
30 protected: | 29 protected: |
31 WorkerOrWorkletGlobalScope* createWorkerGlobalScope( | 30 WorkerOrWorkletGlobalScope* createWorkerGlobalScope( |
32 std::unique_ptr<WorkerThreadStartupData>) override; | 31 std::unique_ptr<WorkerThreadStartupData>) override; |
33 | 32 |
34 private: | 33 private: |
35 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, | 34 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, |
36 InProcessWorkerObjectProxy&, | 35 InProcessWorkerObjectProxy&, |
37 ParentFrameTaskRunners*, | |
38 double timeOrigin); | 36 double timeOrigin); |
39 | 37 |
40 InProcessWorkerObjectProxy& m_workerObjectProxy; | 38 InProcessWorkerObjectProxy& m_workerObjectProxy; |
41 double m_timeOrigin; | 39 double m_timeOrigin; |
42 }; | 40 }; |
43 | 41 |
44 } // namespace blink | 42 } // namespace blink |
45 | 43 |
46 #endif // CompositorWorkerThread_h | 44 #endif // CompositorWorkerThread_h |
OLD | NEW |