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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkletGlobalScopeProxy.h

Issue 2868413005: Worklet: Introduce WorkletOptions for addModule() (Closed)
Patch Set: add TODO comments Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef WorkletGlobalScopeProxy_h 5 #ifndef WorkletGlobalScopeProxy_h
6 #define WorkletGlobalScopeProxy_h 6 #define WorkletGlobalScopeProxy_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/weborigin/KURL.h" 9 #include "platform/weborigin/KURL.h"
10 #include "public/platform/WebURLRequest.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class ScriptSourceCode; 14 class ScriptSourceCode;
14 class WorkletPendingTasks; 15 class WorkletPendingTasks;
15 16
16 // Abstracts communication from (Main/Threaded)Worklet on the main thread to 17 // Abstracts communication from (Main/Threaded)Worklet on the main thread to
17 // (Main/Threaded)WorkletGlobalScope so that Worklet class doesn't have to care 18 // (Main/Threaded)WorkletGlobalScope so that Worklet class doesn't have to care
18 // about the thread WorkletGlobalScope runs on. 19 // about the thread WorkletGlobalScope runs on.
19 class CORE_EXPORT WorkletGlobalScopeProxy { 20 class CORE_EXPORT WorkletGlobalScopeProxy {
20 public: 21 public:
21 virtual ~WorkletGlobalScopeProxy() {} 22 virtual ~WorkletGlobalScopeProxy() {}
22 23
23 // Runs the "fetch and invoke a worklet script" algorithm: 24 // Runs the "fetch and invoke a worklet script" algorithm:
24 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script 25 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
25 virtual void FetchAndInvokeScript(const KURL& module_url_record, 26 virtual void FetchAndInvokeScript(const KURL& module_url_record,
27 WebURLRequest::FetchCredentialsMode,
26 WorkletPendingTasks*) {} 28 WorkletPendingTasks*) {}
27 29
28 // Evaluates the given script source code. This should be called only for 30 // Evaluates the given script source code. This should be called only for
29 // threaded worklets that still use classic script loading. 31 // threaded worklets that still use classic script loading.
30 virtual void EvaluateScript(const ScriptSourceCode&) = 0; 32 virtual void EvaluateScript(const ScriptSourceCode&) = 0;
31 33
32 // Terminates the worklet global scope from the main thread. 34 // Terminates the worklet global scope from the main thread.
33 virtual void TerminateWorkletGlobalScope() = 0; 35 virtual void TerminateWorkletGlobalScope() = 0;
34 }; 36 };
35 37
36 } // namespace blink 38 } // namespace blink
37 39
38 #endif // WorkletGlobalScopeProxy_h 40 #endif // WorkletGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698