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

Unified Diff: third_party/WebKit/Source/modules/worklet/Worklet.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: . Created 4 years, 12 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/modules/worklet/Worklet.h
diff --git a/third_party/WebKit/Source/modules/worklet/Worklet.h b/third_party/WebKit/Source/modules/worklet/Worklet.h
new file mode 100644
index 0000000000000000000000000000000000000000..7ff4fa8ef5361fd0d4f20ab3e1f6f4f303f21dbc
--- /dev/null
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
haraken 2016/01/05 06:08:06 2016. Happy new year :)
ikilpatrick 2016/01/07 22:47:35 Woo! (Done.)
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Worklet_h
+#define Worklet_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/ActiveDOMObject.h"
+#include "modules/worklet/WorkletGlobalScope.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ExecutionContext;
+class WorkletGlobalScope;
+
+class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWrappable, public ActiveDOMObject {
haraken 2016/01/05 06:08:06 Why do you need to make the Worklet an ActiveDOMOb
ikilpatrick 2016/01/07 22:47:35 For importScripts when it is implemented. (pending
+ WTF_MAKE_NONCOPYABLE(Worklet);
+ DEFINE_WRAPPERTYPEINFO();
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Worklet);
+public:
+ // The ExecutionContext argument is the parent document of the Worklet. The
+ // Worklet inherits the url, userAgent, from the document.
+ static Worklet* create(ExecutionContext*);
+
+ DECLARE_TRACE();
+
+private:
+ explicit Worklet(ExecutionContext*);
+
+ RefPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope;
+};
+
+} // namespace blink
+
+#endif // Worklet_h

Powered by Google App Engine
This is Rietveld 408576698