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/CompositorWorkerThread.h" | 5 #include "modules/compositorworker/CompositorWorkerThread.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "bindings/core/v8/ScriptSourceCode.h" | 8 #include "bindings/core/v8/ScriptSourceCode.h" |
9 #include "bindings/core/v8/SourceLocation.h" | 9 #include "bindings/core/v8/SourceLocation.h" |
10 #include "bindings/core/v8/V8GCController.h" | 10 #include "bindings/core/v8/V8GCController.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void SetGlobalScope(WorkerGlobalScope*) override {} | 74 void SetGlobalScope(WorkerGlobalScope*) override {} |
75 void RequestAnimationFrame() override {} | 75 void RequestAnimationFrame() override {} |
76 CompositorProxyClient* GetCompositorProxyClient() override { | 76 CompositorProxyClient* GetCompositorProxyClient() override { |
77 return nullptr; | 77 return nullptr; |
78 }; | 78 }; |
79 }; | 79 }; |
80 | 80 |
81 class CompositorWorkerTestPlatform : public TestingPlatformSupport { | 81 class CompositorWorkerTestPlatform : public TestingPlatformSupport { |
82 public: | 82 public: |
83 CompositorWorkerTestPlatform() | 83 CompositorWorkerTestPlatform() |
84 : thread_(WTF::WrapUnique(old_platform_->CreateThread("Compositor"))) {} | 84 : thread_(old_platform_->CreateThread("Compositor")) {} |
85 | 85 |
86 WebThread* CompositorThread() const override { return thread_.get(); } | 86 WebThread* CompositorThread() const override { return thread_.get(); } |
87 | 87 |
88 WebCompositorSupport* CompositorSupport() override { | 88 WebCompositorSupport* CompositorSupport() override { |
89 return &compositor_support_; | 89 return &compositor_support_; |
90 } | 90 } |
91 | 91 |
92 private: | 92 private: |
93 std::unique_ptr<WebThread> thread_; | 93 std::unique_ptr<WebThread> thread_; |
94 TestingCompositorSupport compositor_support_; | 94 TestingCompositorSupport compositor_support_; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 ASSERT_TRUE(second_isolate); | 245 ASSERT_TRUE(second_isolate); |
246 EXPECT_EQ(first_isolate, second_isolate); | 246 EXPECT_EQ(first_isolate, second_isolate); |
247 | 247 |
248 // Verify that the isolate can run some scripts correctly in the second | 248 // Verify that the isolate can run some scripts correctly in the second |
249 // worker. | 249 // worker. |
250 CheckWorkerCanExecuteScript(second_worker.get()); | 250 CheckWorkerCanExecuteScript(second_worker.get()); |
251 second_worker->TerminateAndWait(); | 251 second_worker->TerminateAndWait(); |
252 } | 252 } |
253 | 253 |
254 } // namespace blink | 254 } // namespace blink |
OLD | NEW |