OLD | NEW |
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/frame/LocalFrameLifecycleObserver.h" | |
14 #include "core/inspector/ConsoleMessage.h" | 13 #include "core/inspector/ConsoleMessage.h" |
| 14 #include "core/workers/MainThreadWorkletGlobalScope.h" |
15 #include "core/workers/WorkerOrWorkletGlobalScope.h" | 15 #include "core/workers/WorkerOrWorkletGlobalScope.h" |
16 #include "platform/heap/Handle.h" | 16 #include "platform/heap/Handle.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class EventQueue; | 20 class EventQueue; |
21 class LocalFrame; | 21 class LocalFrame; |
22 class WorkerOrWorkletScriptController; | 22 class WorkerOrWorkletScriptController; |
23 class WorkletConsole; | 23 class WorkletConsole; |
24 | 24 |
25 class WorkletGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Work
letGlobalScope>, public SecurityContext, public WorkerOrWorkletGlobalScope, publ
ic ScriptWrappable, public LocalFrameLifecycleObserver { | 25 class WorkletGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Work
letGlobalScope>, public SecurityContext, public MainThreadWorkletGlobalScope, pu
blic ScriptWrappable { |
26 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkletGlobalScope); | 27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkletGlobalScope); |
28 public: | 28 public: |
29 #if !ENABLE(OILPAN) | 29 #if !ENABLE(OILPAN) |
30 using RefCounted<WorkletGlobalScope>::ref; | 30 using RefCounted<WorkletGlobalScope>::ref; |
31 using RefCounted<WorkletGlobalScope>::deref; | 31 using RefCounted<WorkletGlobalScope>::deref; |
32 #endif | 32 #endif |
33 | 33 |
34 // The url, userAgent and securityOrigin arguments are inherited from the | 34 // The url, userAgent and securityOrigin arguments are inherited from the |
35 // parent ExecutionContext for Worklets. | 35 // parent ExecutionContext for Worklets. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 KURL m_url; | 91 KURL m_url; |
92 String m_userAgent; | 92 String m_userAgent; |
93 OwnPtrWillBeMember<WorkerOrWorkletScriptController> m_scriptController; | 93 OwnPtrWillBeMember<WorkerOrWorkletScriptController> m_scriptController; |
94 }; | 94 }; |
95 | 95 |
96 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork
letGlobalScope(), context.isWorkletGlobalScope()); | 96 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork
letGlobalScope(), context.isWorkletGlobalScope()); |
97 | 97 |
98 } // namespace blink | 98 } // namespace blink |
99 | 99 |
100 #endif // WorkletGlobalScope_h | 100 #endif // WorkletGlobalScope_h |
OLD | NEW |