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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h

Issue 2003033004: Split custom element script use and move it into bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback. Created 4 years, 7 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/bindings/core/v8/ScriptCustomElementDefinition.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
new file mode 100644
index 0000000000000000000000000000000000000000..96f76ddb79f1c827f9ad3a1c40ead2f8e21aaffc
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
@@ -0,0 +1,54 @@
+// 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 ScriptCustomElementDefinition_h
+#define ScriptCustomElementDefinition_h
+
+#include "bindings/core/v8/ScopedPersistent.h"
+#include "core/CoreExport.h"
+#include "core/dom/custom/CustomElementDefinition.h"
+#include "v8.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class CustomElementDescriptor;
+class CustomElementsRegistry;
+class ScriptState;
+
+class CORE_EXPORT ScriptCustomElementDefinition final :
+ public CustomElementDefinition {
+ WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinition);
+public:
+ static ScriptCustomElementDefinition* forConstructor(
+ ScriptState*,
+ CustomElementsRegistry*,
+ const v8::Local<v8::Value>& constructor);
+
+ static ScriptCustomElementDefinition* create(
+ ScriptState*,
+ CustomElementsRegistry*,
+ const CustomElementDescriptor&,
+ const v8::Local<v8::Object>& constructor,
+ const v8::Local<v8::Object>& prototype);
+
+ virtual ~ScriptCustomElementDefinition() = default;
+
+ v8::Local<v8::Object> constructor(ScriptState*) const;
+ v8::Local<v8::Object> prototype(ScriptState*) const;
+
+private:
+ ScriptCustomElementDefinition(
+ ScriptState*,
+ const CustomElementDescriptor&,
+ const v8::Local<v8::Object>& constructor,
+ const v8::Local<v8::Object>& prototype);
+
+ ScopedPersistent<v8::Object> m_constructor;
+ ScopedPersistent<v8::Object> m_prototype;
+};
+
+} // namespace blink
+
+#endif // ScriptCustomElementDefinition_h

Powered by Google App Engine
This is Rietveld 408576698