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 ScriptWrappable; | 12 class ScriptWrappable; |
13 class WorkerOrWorkletScriptController; | 13 class WorkerOrWorkletScriptController; |
14 | 14 |
15 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext { | 15 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext { |
16 public: | 16 public: |
17 virtual ScriptWrappable* getScriptWrappable() const = 0; | 17 virtual ScriptWrappable* getScriptWrappable() const = 0; |
18 virtual WorkerOrWorkletScriptController* scriptController() = 0; | 18 virtual WorkerOrWorkletScriptController* scriptController() = 0; |
19 virtual bool isClosing() const = 0; | |
yhirano
2016/07/22 06:23:40
Could you add comments for these new functions?
ikilpatrick
2016/07/22 18:21:59
Done.
| |
20 virtual void dispose() = 0; | |
kinuko
2016/07/22 05:44:34
comments?
ikilpatrick
2016/07/22 18:21:59
Done.
| |
19 }; | 21 }; |
20 | 22 |
21 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG lobalScope() || context.isWorkletGlobalScope())); | 23 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG lobalScope() || context.isWorkletGlobalScope())); |
22 | 24 |
23 } // namespace blink | 25 } // namespace blink |
24 | 26 |
25 #endif // WorkerOrWorkletGlobalScope_h | 27 #endif // WorkerOrWorkletGlobalScope_h |
OLD | NEW |