Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
new file mode 100644
index 0000000000000000000000000000000000000000..a418dbfafdcd4185dd0a5e7b5be20dd1b1e03bcc
--- /dev/null
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
@@ -0,0 +1,26 @@
+// 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 ExecutionContext;
+class ScriptWrappable;
+class WorkerOrWorkletScriptController;
+
+class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
+public:
+ virtual ScriptWrappable* scriptWrappable() const = 0;
+ virtual WorkerOrWorkletScriptController* script() = 0;
+};
kinuko 2016/01/13 02:59:20 This new mostly pure interface class looks fine to
ikilpatrick 2016/01/13 04:12:29 Great, thanks.
+
+DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (context->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerGlobalScope() || context.isWorkletGlobalScope()));
+
+} // namespace blink
+
+#endif // WorkerOrWorkletGlobalScope_h

Powered by Google App Engine
This is Rietveld 408576698