| 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 MainThreadWorkletGlobalScope_h | 5 #ifndef MainThreadWorkletGlobalScope_h |
| 6 #define MainThreadWorkletGlobalScope_h | 6 #define MainThreadWorkletGlobalScope_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
| 11 #include "core/workers/WorkletGlobalScope.h" | 11 #include "core/workers/WorkletGlobalScope.h" |
| 12 #include "core/workers/WorkletPendingTasks.h" | 12 #include "core/workers/WorkletPendingTasks.h" |
| 13 #include "platform/WebTaskRunner.h" | 13 #include "platform/WebTaskRunner.h" |
| 14 #include "public/platform/WebURLRequest.h" | 14 #include "public/platform/WebURLRequest.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class ConsoleMessage; | 18 class ConsoleMessage; |
| 19 class LocalFrame; | 19 class LocalFrame; |
| 20 | 20 |
| 21 class CORE_EXPORT MainThreadWorkletGlobalScope | 21 class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkletGlobalScope, |
| 22 : public WorkletGlobalScope, | 22 public ContextClient { |
| 23 public ContextClient { | |
| 24 USING_GARBAGE_COLLECTED_MIXIN(MainThreadWorkletGlobalScope); | 23 USING_GARBAGE_COLLECTED_MIXIN(MainThreadWorkletGlobalScope); |
| 25 | 24 |
| 26 public: | 25 public: |
| 27 MainThreadWorkletGlobalScope(LocalFrame*, | 26 MainThreadWorkletGlobalScope(LocalFrame*, |
| 28 const KURL&, | 27 const KURL&, |
| 29 const String& user_agent, | 28 const String& user_agent, |
| 30 PassRefPtr<SecurityOrigin>, | 29 PassRefPtr<SecurityOrigin>, |
| 31 v8::Isolate*); | 30 v8::Isolate*); |
| 32 ~MainThreadWorkletGlobalScope() override; | 31 ~MainThreadWorkletGlobalScope() override; |
| 33 bool IsMainThreadWorkletGlobalScope() const final { return true; } | 32 bool IsMainThreadWorkletGlobalScope() const final { return true; } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 59 | 58 |
| 60 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, | 59 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, |
| 61 ExecutionContext, | 60 ExecutionContext, |
| 62 context, | 61 context, |
| 63 context->IsMainThreadWorkletGlobalScope(), | 62 context->IsMainThreadWorkletGlobalScope(), |
| 64 context.IsMainThreadWorkletGlobalScope()); | 63 context.IsMainThreadWorkletGlobalScope()); |
| 65 | 64 |
| 66 } // namespace blink | 65 } // namespace blink |
| 67 | 66 |
| 68 #endif // MainThreadWorkletGlobalScope_h | 67 #endif // MainThreadWorkletGlobalScope_h |
| OLD | NEW |