OLD | NEW |
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 10 matching lines...) Expand all Loading... |
21 PaintWorkletGlobalScopeProxy::PaintWorkletGlobalScopeProxy(LocalFrame* frame) { | 21 PaintWorkletGlobalScopeProxy::PaintWorkletGlobalScopeProxy(LocalFrame* frame) { |
22 DCHECK(IsMainThread()); | 22 DCHECK(IsMainThread()); |
23 Document* document = frame->GetDocument(); | 23 Document* document = frame->GetDocument(); |
24 global_scope_ = PaintWorkletGlobalScope::Create( | 24 global_scope_ = PaintWorkletGlobalScope::Create( |
25 frame, document->Url(), document->UserAgent(), | 25 frame, document->Url(), document->UserAgent(), |
26 document->GetSecurityOrigin(), ToIsolate(document)); | 26 document->GetSecurityOrigin(), ToIsolate(document)); |
27 } | 27 } |
28 | 28 |
29 void PaintWorkletGlobalScopeProxy::FetchAndInvokeScript( | 29 void PaintWorkletGlobalScopeProxy::FetchAndInvokeScript( |
30 const KURL& module_url_record, | 30 const KURL& module_url_record, |
| 31 WebURLRequest::FetchCredentialsMode credentials_mode, |
31 WorkletPendingTasks* pending_tasks) { | 32 WorkletPendingTasks* pending_tasks) { |
32 DCHECK(IsMainThread()); | 33 DCHECK(IsMainThread()); |
33 global_scope_->FetchAndInvokeScript(module_url_record, pending_tasks); | 34 global_scope_->FetchAndInvokeScript(module_url_record, credentials_mode, |
| 35 pending_tasks); |
34 } | 36 } |
35 | 37 |
36 void PaintWorkletGlobalScopeProxy::EvaluateScript( | 38 void PaintWorkletGlobalScopeProxy::EvaluateScript( |
37 const ScriptSourceCode& script_source_code) { | 39 const ScriptSourceCode& script_source_code) { |
38 // This should be called only for threaded worklets that still use classic | 40 // This should be called only for threaded worklets that still use classic |
39 // script loading. | 41 // script loading. |
40 NOTREACHED(); | 42 NOTREACHED(); |
41 } | 43 } |
42 | 44 |
43 void PaintWorkletGlobalScopeProxy::TerminateWorkletGlobalScope() { | 45 void PaintWorkletGlobalScopeProxy::TerminateWorkletGlobalScope() { |
(...skipping 10 matching lines...) Expand all Loading... |
54 } | 56 } |
55 | 57 |
56 void PaintWorkletGlobalScopeProxy::AddPendingGenerator( | 58 void PaintWorkletGlobalScopeProxy::AddPendingGenerator( |
57 const String& name, | 59 const String& name, |
58 CSSPaintImageGeneratorImpl* generator) { | 60 CSSPaintImageGeneratorImpl* generator) { |
59 DCHECK(IsMainThread()); | 61 DCHECK(IsMainThread()); |
60 global_scope_->AddPendingGenerator(name, generator); | 62 global_scope_->AddPendingGenerator(name, generator); |
61 } | 63 } |
62 | 64 |
63 } // namespace blink | 65 } // namespace blink |
OLD | NEW |