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

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

Issue 2910953002: Worklet: Enqueue tasks into outsideSetting's event loop (Closed)
Patch Set: fix 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
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 #include "public/platform/WebURLRequest.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class ScriptSourceCode; 14 class ScriptSourceCode;
15 class ParentFrameTaskRunners;
15 class WorkletPendingTasks; 16 class WorkletPendingTasks;
16 17
17 // Abstracts communication from (Main/Threaded)Worklet on the main thread to 18 // Abstracts communication from (Main/Threaded)Worklet on the main thread to
18 // (Main/Threaded)WorkletGlobalScope so that Worklet class doesn't have to care 19 // (Main/Threaded)WorkletGlobalScope so that Worklet class doesn't have to care
19 // about the thread WorkletGlobalScope runs on. 20 // about the thread WorkletGlobalScope runs on.
20 class CORE_EXPORT WorkletGlobalScopeProxy { 21 class CORE_EXPORT WorkletGlobalScopeProxy {
21 public: 22 public:
22 virtual ~WorkletGlobalScopeProxy() {} 23 virtual ~WorkletGlobalScopeProxy() {}
23 24
24 // Runs the "fetch and invoke a worklet script" algorithm: 25 // Runs the "fetch and invoke a worklet script" algorithm:
25 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script 26 // https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
26 virtual void FetchAndInvokeScript(const KURL& module_url_record, 27 virtual void FetchAndInvokeScript(const KURL& module_url_record,
27 WebURLRequest::FetchCredentialsMode, 28 WebURLRequest::FetchCredentialsMode,
29 ParentFrameTaskRunners*,
28 WorkletPendingTasks*) {} 30 WorkletPendingTasks*) {}
29 31
30 // Evaluates the given script source code. This should be called only for 32 // Evaluates the given script source code. This should be called only for
31 // threaded worklets that still use classic script loading. 33 // threaded worklets that still use classic script loading.
32 virtual void EvaluateScript(const ScriptSourceCode&) = 0; 34 virtual void EvaluateScript(const ScriptSourceCode&) = 0;
33 35
34 // Terminates the worklet global scope from the main thread. 36 // Terminates the worklet global scope from the main thread.
35 virtual void TerminateWorkletGlobalScope() = 0; 37 virtual void TerminateWorkletGlobalScope() = 0;
36 }; 38 };
37 39
38 } // namespace blink 40 } // namespace blink
39 41
40 #endif // WorkletGlobalScopeProxy_h 42 #endif // WorkletGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698