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 "core/workers/WorkerThread.h" | 8 #include "core/workers/WorkerThread.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.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 : public WorkerThread { | 16 class MODULES_EXPORT CompositorWorkerThread final : public WorkerThread { |
17 public: | 17 public: |
18 static std::unique_ptr<CompositorWorkerThread> create(PassRefPtr<WorkerLoade
rProxy>, InProcessWorkerObjectProxy&, double timeOrigin); | 18 static std::unique_ptr<CompositorWorkerThread> create(PassRefPtr<WorkerLoade
rProxy>, InProcessWorkerObjectProxy&, double timeOrigin); |
19 ~CompositorWorkerThread() override; | 19 ~CompositorWorkerThread() override; |
20 | 20 |
21 InProcessWorkerObjectProxy& workerObjectProxy() const { return m_workerObjec
tProxy; } | 21 InProcessWorkerObjectProxy& workerObjectProxy() const { return m_workerObjec
tProxy; } |
22 WorkerBackingThread& workerBackingThread() override; | 22 WorkerBackingThread& workerBackingThread() override; |
23 ConsoleMessageStorage* consoleMessageStorage() final; | |
24 bool shouldAttachThreadDebugger() const override { return false; } | 23 bool shouldAttachThreadDebugger() const override { return false; } |
25 | 24 |
26 static void ensureSharedBackingThread(); | 25 static void ensureSharedBackingThread(); |
27 static void createSharedBackingThreadForTest(); | 26 static void createSharedBackingThreadForTest(); |
28 | 27 |
29 static void clearSharedBackingThread(); | 28 static void clearSharedBackingThread(); |
30 | 29 |
31 protected: | 30 protected: |
32 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP
roxy&, double timeOrigin); | 31 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP
roxy&, double timeOrigin); |
33 | 32 |
34 WorkerOrWorkletGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerTh
readStartupData>) override; | 33 WorkerOrWorkletGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerTh
readStartupData>) override; |
35 bool isOwningBackingThread() const override { return false; } | 34 bool isOwningBackingThread() const override { return false; } |
36 | 35 |
37 private: | 36 private: |
38 InProcessWorkerObjectProxy& m_workerObjectProxy; | 37 InProcessWorkerObjectProxy& m_workerObjectProxy; |
39 double m_timeOrigin; | 38 double m_timeOrigin; |
40 }; | 39 }; |
41 | 40 |
42 } // namespace blink | 41 } // namespace blink |
43 | 42 |
44 #endif // CompositorWorkerThread_h | 43 #endif // CompositorWorkerThread_h |
OLD | NEW |