Chromium Code Reviews| 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 |