Index: third_party/WebKit/Source/core/workers/AbstractGlobalScope.h |
diff --git a/third_party/WebKit/Source/core/workers/AbstractGlobalScope.h b/third_party/WebKit/Source/core/workers/AbstractGlobalScope.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..150626346ee156deb4613bc76fcbdc7c1546f899 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/workers/AbstractGlobalScope.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2015 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 AbstractGlobalScope_h |
+#define AbstractGlobalScope_h |
+ |
+#include "core/dom/ExecutionContext.h" |
+#include "core/dom/SecurityContext.h" |
+#include "core/events/EventTarget.h" |
+#include "platform/Supplementable.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace blink { |
+ |
+class GlobalScopeScriptController; |
+ |
+class AbstractGlobalScope : public SecurityContext, public ExecutionContext { |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AbstractGlobalScope); |
+public: |
+ ~AbstractGlobalScope() override { }; |
+ |
+ virtual ExecutionContext* executionContext() const = 0; |
+ virtual GlobalScopeScriptController* script() = 0; |
+ virtual v8::Isolate* isolate() const = 0; |
+ virtual void didStopRunLoop() { } |
+ |
+ DEFINE_INLINE_TRACE() { |
+ ExecutionContext::trace(visitor); |
+ SecurityContext::trace(visitor); |
+ } |
+private: |
+ void didUpdateSecurityOrigin() final { } |
+}; |
+ |
+DEFINE_TYPE_CASTS(AbstractGlobalScope, ExecutionContext, value, (value->isWorkerGlobalScope() || value->isWorkletGlobalScope()), (value.isWorkerGlobalScope() || value.isWorkletGlobalScope())); |
+ |
+} // namespace blink |
+ |
+#endif // AbstractGlobalScope_h |