summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
blob: 0127a065141280b0587431d5274464925a8153ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WorkerOrWorkletGlobalScope_h
#define WorkerOrWorkletGlobalScope_h

#include "core/dom/ExecutionContext.h"

namespace blink {

class ScriptWrappable;
class WorkerOrWorkletScriptController;

class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
public:
    virtual ScriptWrappable* getScriptWrappable() const = 0;
    virtual WorkerOrWorkletScriptController* scriptController() = 0;
};

DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (context->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerGlobalScope() || context.isWorkletGlobalScope()));

} // namespace blink

#endif // WorkerOrWorkletGlobalScope_h