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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/WorkletScriptController.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: remove AbstractGlobalScope. Created 5 years 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/bindings/modules/v8/WorkletScriptController.h
diff --git a/third_party/WebKit/Source/bindings/modules/v8/WorkletScriptController.h b/third_party/WebKit/Source/bindings/modules/v8/WorkletScriptController.h
new file mode 100644
index 0000000000000000000000000000000000000000..8e01511386040587d21c2d0a252bb3c3d264864d
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/modules/v8/WorkletScriptController.h
@@ -0,0 +1,43 @@
+// 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 WorkletScriptController_h
+#define WorkletScriptController_h
+
+#include "bindings/core/v8/GlobalScopeScriptController.h"
+
+namespace blink {
+
+class ErrorEvent;
+class ScriptCallStack;
+class WorkletGlobalScope;
+
+class WorkletScriptController final : public GlobalScopeScriptController {
+ USING_FAST_MALLOC_WILL_BE_REMOVED(WorkletScriptController);
+ WTF_MAKE_NONCOPYABLE(WorkletScriptController);
+public:
+ static PassOwnPtrWillBeRawPtr<WorkletScriptController> create(WorkletGlobalScope*, v8::Isolate*);
+ virtual ~WorkletScriptController();
+
+ DECLARE_TRACE();
+private:
+ WorkletScriptController(WorkletGlobalScope*, v8::Isolate*);
+
+ void didStopRunLoop() final { }
+ v8::Isolate* isolate() const final;
+ bool isContextThread() const final { return true; }
+
+ const WrapperTypeInfo* wrapperTypeInfoForGlobalScope() const final;
+ v8::Local<v8::Object> associateGlobalScopeWithWrapper(const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) final;
+ v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Script>) final;
+
+ bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus) final;
+ void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, int scriptId, PassRefPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus) final;
+
+ RawPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope;
+};
+
+} // namespace blink
+
+#endif // WorkletScriptController_h

Powered by Google App Engine
This is Rietveld 408576698