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

Side by Side Diff: third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.h

Issue 1839913002: Implement PaintWorkletGlobalScope#registerPaint() for the CSS Paint API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + remove WillBe types. Created 4 years, 8 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 WorkletGlobalScope_h 5 #ifndef WorkletGlobalScope_h
6 #define WorkletGlobalScope_h 6 #define WorkletGlobalScope_h
7 7
8 #include "bindings/core/v8/ScriptCallStack.h" 8 #include "bindings/core/v8/ScriptCallStack.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/ExecutionContext.h" 10 #include "core/dom/ExecutionContext.h"
11 #include "core/dom/ExecutionContextTask.h" 11 #include "core/dom/ExecutionContextTask.h"
12 #include "core/dom/SecurityContext.h" 12 #include "core/dom/SecurityContext.h"
13 #include "core/inspector/ConsoleMessage.h" 13 #include "core/inspector/ConsoleMessage.h"
14 #include "core/workers/MainThreadWorkletGlobalScope.h" 14 #include "core/workers/MainThreadWorkletGlobalScope.h"
15 #include "core/workers/WorkerOrWorkletGlobalScope.h" 15 #include "core/workers/WorkerOrWorkletGlobalScope.h"
16 #include "modules/ModulesExport.h"
16 #include "platform/heap/Handle.h" 17 #include "platform/heap/Handle.h"
17 18
18 namespace blink { 19 namespace blink {
19 20
20 class EventQueue; 21 class EventQueue;
21 class LocalFrame; 22 class LocalFrame;
22 class WorkerOrWorkletScriptController; 23 class WorkerOrWorkletScriptController;
23 class WorkletConsole; 24 class WorkletConsole;
24 25
25 class WorkletGlobalScope : public GarbageCollectedFinalized<WorkletGlobalScope>, public SecurityContext, public MainThreadWorkletGlobalScope, public ScriptWrapp able { 26 class MODULES_EXPORT WorkletGlobalScope : public GarbageCollectedFinalized<Workl etGlobalScope>, public SecurityContext, public MainThreadWorkletGlobalScope, pub lic ScriptWrappable {
26 DEFINE_WRAPPERTYPEINFO(); 27 DEFINE_WRAPPERTYPEINFO();
27 USING_GARBAGE_COLLECTED_MIXIN(WorkletGlobalScope); 28 USING_GARBAGE_COLLECTED_MIXIN(WorkletGlobalScope);
28 public: 29 public:
29 #if !ENABLE(OILPAN) 30 #if !ENABLE(OILPAN)
30 using RefCounted<WorkletGlobalScope>::ref; 31 using RefCounted<WorkletGlobalScope>::ref;
31 using RefCounted<WorkletGlobalScope>::deref; 32 using RefCounted<WorkletGlobalScope>::deref;
32 #endif 33 #endif
33 34
34 ~WorkletGlobalScope() override; 35 ~WorkletGlobalScope() override;
36 virtual void dispose();
35 37
36 bool isWorkletGlobalScope() const final { return true; } 38 bool isWorkletGlobalScope() const final { return true; }
37 39
38 // WorkletGlobalScope 40 // WorkletGlobalScope
39 WorkletConsole* console(); 41 WorkletConsole* console();
40 42
41 // WorkerOrWorkletGlobalScope 43 // WorkerOrWorkletGlobalScope
42 ScriptWrappable* getScriptWrappable() const final { return const_cast<Workle tGlobalScope*>(this); } 44 ScriptWrappable* getScriptWrappable() const final { return const_cast<Workle tGlobalScope*>(this); }
43 WorkerOrWorkletScriptController* scriptController() final { return m_scriptC ontroller.get(); } 45 WorkerOrWorkletScriptController* scriptController() final { return m_scriptC ontroller.get(); }
44 46
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 KURL m_url; 93 KURL m_url;
92 String m_userAgent; 94 String m_userAgent;
93 Member<WorkerOrWorkletScriptController> m_scriptController; 95 Member<WorkerOrWorkletScriptController> m_scriptController;
94 }; 96 };
95 97
96 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork letGlobalScope(), context.isWorkletGlobalScope()); 98 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork letGlobalScope(), context.isWorkletGlobalScope());
97 99
98 } // namespace blink 100 } // namespace blink
99 101
100 #endif // WorkletGlobalScope_h 102 #endif // WorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698