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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.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/ScriptCustomElementDefinitionBuilder.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6d98ab1cee403410831c3e29a54a7eb8af56ff2
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
@@ -0,0 +1,50 @@
+// 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 ScriptCustomElementDefinitionBuilder_h
+#define ScriptCustomElementDefinitionBuilder_h
+
+#include "core/CoreExport.h"
+#include "core/dom/custom/CustomElementDefinitionBuilder.h"
+#include "platform/heap/Handle.h"
+#include "v8.h"
+#include "wtf/Allocator.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/RefPtr.h"
+
+namespace blink {
+
+class CustomElementsRegistry;
+class ExceptionState;
+class ScriptState;
+class ScriptValue;
+
+class CORE_EXPORT ScriptCustomElementDefinitionBuilder
+ : public CustomElementDefinitionBuilder {
+ STACK_ALLOCATED();
+ WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinitionBuilder);
+public:
+ ScriptCustomElementDefinitionBuilder(
+ ScriptState*,
+ CustomElementsRegistry*,
+ const ScriptValue& constructorScriptValue,
+ ExceptionState&);
+
+ bool checkConstructorIntrinsics() override;
+ bool checkConstructorNotRegistered() override;
+ bool checkPrototype() override;
+ CustomElementDefinition* build(const CustomElementDescriptor&) override;
+
+private:
+ RefPtr<ScriptState> m_scriptState;
+ Member<CustomElementsRegistry> m_registry;
+ v8::Local<v8::Value> m_constructorValue;
+ v8::Local<v8::Object> m_constructor;
+ v8::Local<v8::Object> m_prototype;
+ ExceptionState& m_exceptionState;
+};
+
+} // namespace blink
+
+#endif // ScriptCustomElementDefinitionBuilder_h

Powered by Google App Engine
This is Rietveld 408576698