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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp

Issue 2911093002: Worklet: Move loader client impl from ThreadedWorklet to ThreadedWorkletMessagingProxy
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/csspaint/PaintWorkletGlobalScopeProxy.h" 5 #include "modules/csspaint/PaintWorkletGlobalScopeProxy.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/V8BindingForCore.h" 8 #include "bindings/core/v8/V8BindingForCore.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 22 matching lines...) Expand all
33 const KURL& module_url_record, 33 const KURL& module_url_record,
34 WebURLRequest::FetchCredentialsMode credentials_mode, 34 WebURLRequest::FetchCredentialsMode credentials_mode,
35 RefPtr<WebTaskRunner> outside_settings_task_runner, 35 RefPtr<WebTaskRunner> outside_settings_task_runner,
36 WorkletPendingTasks* pending_tasks) { 36 WorkletPendingTasks* pending_tasks) {
37 DCHECK(IsMainThread()); 37 DCHECK(IsMainThread());
38 global_scope_->FetchAndInvokeScript(module_url_record, credentials_mode, 38 global_scope_->FetchAndInvokeScript(module_url_record, credentials_mode,
39 std::move(outside_settings_task_runner), 39 std::move(outside_settings_task_runner),
40 pending_tasks); 40 pending_tasks);
41 } 41 }
42 42
43 void PaintWorkletGlobalScopeProxy::EvaluateScript(
44 const ScriptSourceCode& script_source_code) {
45 // This should be called only for threaded worklets that still use classic
46 // script loading.
47 NOTREACHED();
48 }
49
50 void PaintWorkletGlobalScopeProxy::TerminateWorkletGlobalScope() { 43 void PaintWorkletGlobalScopeProxy::TerminateWorkletGlobalScope() {
51 DCHECK(IsMainThread()); 44 DCHECK(IsMainThread());
52 global_scope_->Terminate(); 45 global_scope_->Terminate();
53 // Nullify the global scope to cut a potential reference cycle. 46 // Nullify the global scope to cut a potential reference cycle.
54 global_scope_ = nullptr; 47 global_scope_ = nullptr;
55 } 48 }
56 49
57 CSSPaintDefinition* PaintWorkletGlobalScopeProxy::FindDefinition( 50 CSSPaintDefinition* PaintWorkletGlobalScopeProxy::FindDefinition(
58 const String& name) { 51 const String& name) {
59 DCHECK(IsMainThread()); 52 DCHECK(IsMainThread());
60 return global_scope_->FindDefinition(name); 53 return global_scope_->FindDefinition(name);
61 } 54 }
62 55
63 } // namespace blink 56 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698