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

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

Issue 2839123003: Worklet: Introduce "pending tasks struct" concept defined in the Worklet spec (Closed)
Patch Set: address review 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 "platform/wtf/text/WTFString.h"
11 10
12 namespace blink { 11 namespace blink {
13 12
14 class ScriptSourceCode; 13 class ScriptSourceCode;
14 class WorkletPendingTasks;
15 15
16 // A proxy to talk to the worklet global scope. The global scope may exist in 16 // A proxy to talk to the worklet global scope. The global scope may exist in
17 // the main thread or on a different thread. 17 // the main thread or on a different thread.
18 class CORE_EXPORT WorkletGlobalScopeProxy { 18 class CORE_EXPORT WorkletGlobalScopeProxy {
19 public: 19 public:
20 virtual ~WorkletGlobalScopeProxy() {} 20 virtual ~WorkletGlobalScopeProxy() {}
21 21
22 // Runs the "fetch and invoke a worklet script" algorithm: 22 // Runs the "fetch and invoke a worklet script" algorithm:
23 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script 23 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
24 virtual void FetchAndInvokeScript(int32_t request_id, 24 virtual void FetchAndInvokeScript(const KURL& module_url_record,
25 const KURL& script_url) {} 25 WorkletPendingTasks*) {}
26 26
27 // Evaluates the given script source code. This should be called only for 27 // Evaluates the given script source code. This should be called only for
28 // threaded worklets that still use classic script loading. 28 // threaded worklets that still use classic script loading.
29 virtual void EvaluateScript(const ScriptSourceCode&) = 0; 29 virtual void EvaluateScript(const ScriptSourceCode&) = 0;
30 30
31 // Terminates the worklet global scope from the main thread. 31 // Terminates the worklet global scope from the main thread.
32 virtual void TerminateWorkletGlobalScope() = 0; 32 virtual void TerminateWorkletGlobalScope() = 0;
33 }; 33 };
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 #endif // WorkletGlobalScopeProxy_h 37 #endif // WorkletGlobalScopeProxy_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/Worklet.h ('k') | third_party/WebKit/Source/core/workers/WorkletObjectProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698