Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ScriptCustomElementDefinitionBuilder_h | |
| 6 #define ScriptCustomElementDefinitionBuilder_h | |
| 7 | |
| 8 #include "core/CoreExport.h" | |
| 9 #include "core/dom/custom/CustomElementDefinitionBuilder.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 #include "v8.h" | |
| 12 #include "wtf/Allocator.h" | |
| 13 #include "wtf/Noncopyable.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class CustomElementsRegistry; | |
| 18 class ExceptionState; | |
| 19 class ScriptState; | |
| 20 class ScriptValue; | |
| 21 | |
| 22 class CORE_EXPORT ScriptCustomElementDefinitionBuilder | |
| 23 : public CustomElementDefinitionBuilder { | |
| 24 STACK_ALLOCATED(); | |
| 25 WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinitionBuilder); | |
| 26 public: | |
| 27 ScriptCustomElementDefinitionBuilder( | |
| 28 ScriptState*, | |
| 29 CustomElementsRegistry*, | |
| 30 const ScriptValue& constructorScriptValue, | |
| 31 ExceptionState&); | |
| 32 | |
| 33 void checkConstructorIntrinsics() override; | |
| 34 void checkConstructorNotRegistered() override; | |
| 35 bool checkPrototype() override; | |
| 36 CustomElementDefinition* build(const CustomElementDescriptor&) override; | |
| 37 | |
| 38 private: | |
| 39 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.
| |
| 40 Member<CustomElementsRegistry> m_registry; | |
| 41 v8::Local<v8::Value> m_constructorValue; | |
| 42 v8::Local<v8::Object> m_constructor; | |
| 43 v8::Local<v8::Object> m_prototype; | |
| 44 ExceptionState& m_exceptionState; | |
| 45 }; | |
| 46 | |
| 47 } // namespace blink | |
| 48 | |
| 49 #endif // ScriptCustomElementDefinitionBuilder_h | |
| OLD | NEW |