Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp

Issue 2116113002: [worklets] Make WorkerThread handle both Worker and Worklet global scopes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "modules/compositorworker/CompositorWorkerThread.h" 5 #include "modules/compositorworker/CompositorWorkerThread.h"
6 6
7 #include "bindings/core/v8/V8GCController.h" 7 #include "bindings/core/v8/V8GCController.h"
8 #include "bindings/core/v8/V8Initializer.h" 8 #include "bindings/core/v8/V8Initializer.h"
9 #include "core/workers/InProcessWorkerObjectProxy.h" 9 #include "core/workers/InProcessWorkerObjectProxy.h"
10 #include "core/workers/WorkerBackingThread.h" 10 #include "core/workers/WorkerBackingThread.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 CompositorWorkerThread::~CompositorWorkerThread() 124 CompositorWorkerThread::~CompositorWorkerThread()
125 { 125 {
126 } 126 }
127 127
128 WorkerBackingThread& CompositorWorkerThread::workerBackingThread() 128 WorkerBackingThread& CompositorWorkerThread::workerBackingThread()
129 { 129 {
130 return *BackingThreadHolder::instance().thread(); 130 return *BackingThreadHolder::instance().thread();
131 } 131 }
132 132
133 WorkerGlobalScope*CompositorWorkerThread::createWorkerGlobalScope(std::unique_pt r<WorkerThreadStartupData> startupData) 133 WorkerOrWorkletGlobalScope* CompositorWorkerThread::createWorkerGlobalScope(std: :unique_ptr<WorkerThreadStartupData> startupData)
134 { 134 {
135 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositorWork erThread::createWorkerGlobalScope"); 135 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositorWork erThread::createWorkerGlobalScope");
136 return CompositorWorkerGlobalScope::create(this, std::move(startupData), m_t imeOrigin); 136 return CompositorWorkerGlobalScope::create(this, std::move(startupData), m_t imeOrigin);
137 } 137 }
138 138
139 ConsoleMessageStorage* CompositorWorkerThread::consoleMessageStorage()
140 {
141 return toWorkerGlobalScope(globalScope())->consoleMessageStorage();
142 }
143
139 void CompositorWorkerThread::ensureSharedBackingThread() 144 void CompositorWorkerThread::ensureSharedBackingThread()
140 { 145 {
141 DCHECK(isMainThread()); 146 DCHECK(isMainThread());
142 BackingThreadHolder::ensureInstance(); 147 BackingThreadHolder::ensureInstance();
143 } 148 }
144 149
145 void CompositorWorkerThread::clearSharedBackingThread() 150 void CompositorWorkerThread::clearSharedBackingThread()
146 { 151 {
147 DCHECK(isMainThread()); 152 DCHECK(isMainThread());
148 BackingThreadHolder::clear(); 153 BackingThreadHolder::clear();
149 } 154 }
150 155
151 void CompositorWorkerThread::createSharedBackingThreadForTest() 156 void CompositorWorkerThread::createSharedBackingThreadForTest()
152 { 157 {
153 BackingThreadHolder::createForTest(); 158 BackingThreadHolder::createForTest();
154 } 159 }
155 160
156 } // namespace blink 161 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698