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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintWorklet.h

Issue 2840523002: [DONT COMMIT] Worklet: Implement "addModule()" algorithm for main thread worklets (Closed)
Patch Set: 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 PaintWorklet_h 5 #ifndef PaintWorklet_h
6 #define PaintWorklet_h 6 #define PaintWorklet_h
7 7
8 #include "core/workers/MainThreadWorklet.h" 8 #include "core/workers/MainThreadWorklet.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/csspaint/PaintWorkletGlobalScope.h"
11 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
12 11
13 namespace blink { 12 namespace blink {
14 13
15 class CSSPaintDefinition; 14 class CSSPaintDefinition;
16 class CSSPaintImageGeneratorImpl; 15 class CSSPaintImageGeneratorImpl;
17 16
18 class MODULES_EXPORT PaintWorklet final : public MainThreadWorklet { 17 class MODULES_EXPORT PaintWorklet final : public MainThreadWorklet {
19 WTF_MAKE_NONCOPYABLE(PaintWorklet); 18 WTF_MAKE_NONCOPYABLE(PaintWorklet);
20 19
21 public: 20 public:
22 static PaintWorklet* Create(LocalFrame*); 21 static PaintWorklet* Create(LocalFrame*);
23 ~PaintWorklet() override; 22 ~PaintWorklet() override;
24 23
25 PaintWorkletGlobalScope* GetWorkletGlobalScopeProxy() const final;
26 CSSPaintDefinition* FindDefinition(const String& name); 24 CSSPaintDefinition* FindDefinition(const String& name);
27 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); 25 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*);
28 26
29 DECLARE_VIRTUAL_TRACE(); 27 DECLARE_VIRTUAL_TRACE();
30 28
31 private: 29 private:
30 friend class PaintWorkletTest;
31
32 explicit PaintWorklet(LocalFrame*); 32 explicit PaintWorklet(LocalFrame*);
33 33
34 Member<PaintWorkletGlobalScope> paint_worklet_global_scope_; 34 void CreateWorkletGlobalScope() override;
35 }; 35 };
36 36
37 } // namespace blink 37 } // namespace blink
38 38
39 #endif // PaintWorklet_h 39 #endif // PaintWorklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698