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

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: 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/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..fc8fd5d39e0fc6db860e9031243a9bcbc54cb28e
--- /dev/null
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.h
@@ -0,0 +1,35 @@
+// 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 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 {
+ WTF_MAKE_NONCOPYABLE(Worklet);
+ DEFINE_WRAPPERTYPEINFO();
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Worklet);
+public:
+ static Worklet* create(ExecutionContext*);
kinuko 2015/12/24 04:45:51 Can we add a comment to note that the given Execut
ikilpatrick 2015/12/27 20:22:39 Done.
+
+ DECLARE_TRACE();
+
+private:
+ explicit Worklet(ExecutionContext*);
+
+ RefPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope;
+};
+
+} // namespace blink
+
+#endif // Worklet_h

Powered by Google App Engine
This is Rietveld 408576698