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; |
23 bool shouldAttachThreadDebugger() const override { return false; } | 24 bool shouldAttachThreadDebugger() const override { return false; } |
24 | 25 |
25 static void ensureSharedBackingThread(); | 26 static void ensureSharedBackingThread(); |
26 static void createSharedBackingThreadForTest(); | 27 static void createSharedBackingThreadForTest(); |
27 | 28 |
28 static void clearSharedBackingThread(); | 29 static void clearSharedBackingThread(); |
29 | 30 |
30 protected: | 31 protected: |
31 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP
roxy&, double timeOrigin); | 32 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP
roxy&, double timeOrigin); |
32 | 33 |
33 WorkerGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerThreadStart
upData>) override; | 34 WorkerOrWorkletGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerTh
readStartupData>) override; |
34 bool isOwningBackingThread() const override { return false; } | 35 bool isOwningBackingThread() const override { return false; } |
35 | 36 |
36 private: | 37 private: |
37 InProcessWorkerObjectProxy& m_workerObjectProxy; | 38 InProcessWorkerObjectProxy& m_workerObjectProxy; |
38 double m_timeOrigin; | 39 double m_timeOrigin; |
39 }; | 40 }; |
40 | 41 |
41 } // namespace blink | 42 } // namespace blink |
42 | 43 |
43 #endif // CompositorWorkerThread_h | 44 #endif // CompositorWorkerThread_h |
OLD | NEW |