| 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 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" | 5 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "bindings/core/v8/SerializedScriptValue.h" | 9 #include "bindings/core/v8/SerializedScriptValue.h" |
| 10 #include "core/dom/CompositorWorkerProxyClient.h" | 10 #include "core/dom/CompositorWorkerProxyClient.h" |
| 11 #include "core/workers/InProcessWorkerObjectProxy.h" | 11 #include "core/workers/InProcessWorkerObjectProxy.h" |
| 12 #include "core/workers/WorkerThreadStartupData.h" | 12 #include "core/workers/WorkerThreadStartupData.h" |
| 13 #include "modules/EventTargetModules.h" | 13 #include "modules/EventTargetModules.h" |
| 14 #include "modules/compositorworker/CompositorWorkerThread.h" | 14 #include "modules/compositorworker/CompositorWorkerThread.h" |
| 15 #include "wtf/AutoReset.h" | 15 #include "platform/wtf/AutoReset.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::Create( | 19 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::Create( |
| 20 CompositorWorkerThread* thread, | 20 CompositorWorkerThread* thread, |
| 21 std::unique_ptr<WorkerThreadStartupData> startup_data, | 21 std::unique_ptr<WorkerThreadStartupData> startup_data, |
| 22 double time_origin) { | 22 double time_origin) { |
| 23 // Note: startupData is finalized on return. After the relevant parts has been | 23 // Note: startupData is finalized on return. After the relevant parts has been |
| 24 // passed along to the created 'context'. | 24 // passed along to the created 'context'. |
| 25 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope( | 25 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope( |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 callback_collection_.ExecuteCallbacks(high_res_time_ms, high_res_time_ms); | 102 callback_collection_.ExecuteCallbacks(high_res_time_ms, high_res_time_ms); |
| 103 return !callback_collection_.IsEmpty(); | 103 return !callback_collection_.IsEmpty(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 InProcessWorkerObjectProxy& CompositorWorkerGlobalScope::WorkerObjectProxy() | 106 InProcessWorkerObjectProxy& CompositorWorkerGlobalScope::WorkerObjectProxy() |
| 107 const { | 107 const { |
| 108 return static_cast<CompositorWorkerThread*>(GetThread())->WorkerObjectProxy(); | 108 return static_cast<CompositorWorkerThread*>(GetThread())->WorkerObjectProxy(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |