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

Side by Side Diff: third_party/WebKit/Source/core/workers/Worklet.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 Worklet_h 5 #ifndef Worklet_h
6 #define Worklet_h 6 #define Worklet_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 14 matching lines...) Expand all
25 public ContextLifecycleObserver { 25 public ContextLifecycleObserver {
26 DEFINE_WRAPPERTYPEINFO(); 26 DEFINE_WRAPPERTYPEINFO();
27 USING_GARBAGE_COLLECTED_MIXIN(Worklet); 27 USING_GARBAGE_COLLECTED_MIXIN(Worklet);
28 WTF_MAKE_NONCOPYABLE(Worklet); 28 WTF_MAKE_NONCOPYABLE(Worklet);
29 29
30 public: 30 public:
31 virtual ~Worklet() = default; 31 virtual ~Worklet() = default;
32 32
33 // Worklet.idl 33 // Worklet.idl
34 // addModule() imports ES6 module scripts. 34 // addModule() imports ES6 module scripts.
35 virtual ScriptPromise addModule(ScriptState*, const String& url) = 0; 35 virtual ScriptPromise addModule(ScriptState*, const String& module_url) = 0;
36 36
37 // Returns a proxy to WorkletGlobalScope on the context thread. 37 // Returns a proxy to WorkletGlobalScope on the context thread.
38 virtual WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const = 0; 38 virtual WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const = 0;
39 39
40 // ContextLifecycleObserver 40 // ContextLifecycleObserver
41 virtual void ContextDestroyed(ExecutionContext*); 41 virtual void ContextDestroyed(ExecutionContext*);
42 42
43 DECLARE_VIRTUAL_TRACE(); 43 DECLARE_VIRTUAL_TRACE();
44 44
45 protected: 45 protected:
46 // The Worklet inherits the url and userAgent from the frame->document(). 46 // The Worklet inherits the url and userAgent from the frame->document().
47 explicit Worklet(LocalFrame*); 47 explicit Worklet(LocalFrame*);
48 48
49 Member<LocalFrame> frame_; 49 Member<LocalFrame> frame_;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // Worklet_h 54 #endif // Worklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698