| 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 WorkerOrWorkletGlobalScope_h | 5 #ifndef WorkerOrWorkletGlobalScope_h |
| 6 #define WorkerOrWorkletGlobalScope_h | 6 #define WorkerOrWorkletGlobalScope_h |
| 7 | 7 |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class ExecutionContext; | |
| 13 class ScriptWrappable; | 12 class ScriptWrappable; |
| 14 class WorkerOrWorkletScriptController; | 13 class WorkerOrWorkletScriptController; |
| 15 | 14 |
| 16 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext { | 15 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext { |
| 17 public: | 16 public: |
| 18 virtual ScriptWrappable* getScriptWrappable() const = 0; | 17 virtual ScriptWrappable* getScriptWrappable() const = 0; |
| 19 virtual WorkerOrWorkletScriptController* scriptController() = 0; | 18 virtual WorkerOrWorkletScriptController* scriptController() = 0; |
| 20 }; | 19 }; |
| 21 | 20 |
| 22 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex
t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG
lobalScope() || context.isWorkletGlobalScope())); | 21 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex
t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG
lobalScope() || context.isWorkletGlobalScope())); |
| 23 | 22 |
| 24 } // namespace blink | 23 } // namespace blink |
| 25 | 24 |
| 26 #endif // WorkerOrWorkletGlobalScope_h | 25 #endif // WorkerOrWorkletGlobalScope_h |
| OLD | NEW |