Chromium Code Reviews| 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..d2bfde6798d23f1fcc995846571c82d4483898d4 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h |
| @@ -0,0 +1,49 @@ |
| +// 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" |
| + |
| +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&); |
| + |
| + void checkConstructorIntrinsics() override; |
| + void checkConstructorNotRegistered() override; |
| + bool checkPrototype() override; |
| + CustomElementDefinition* build(const CustomElementDescriptor&) override; |
| + |
| +private: |
| + ScriptState* m_scriptState; |
|
haraken
2016/05/26 08:33:46
Use RefPtr<ScriptState>.
dominicc (has gone to gerrit)
2016/05/27 04:54:17
Done. Good point--thanks.
|
| + 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 |