| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ScriptCustomElementDefinitionBuilder_h | 5 #ifndef ScriptCustomElementDefinitionBuilder_h |
| 6 #define ScriptCustomElementDefinitionBuilder_h | 6 #define ScriptCustomElementDefinitionBuilder_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/custom/CustomElementDefinitionBuilder.h" | 9 #include "core/dom/custom/CustomElementDefinitionBuilder.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 : public CustomElementDefinitionBuilder { | 28 : public CustomElementDefinitionBuilder { |
| 29 STACK_ALLOCATED(); | 29 STACK_ALLOCATED(); |
| 30 WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinitionBuilder); | 30 WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinitionBuilder); |
| 31 | 31 |
| 32 public: | 32 public: |
| 33 ScriptCustomElementDefinitionBuilder( | 33 ScriptCustomElementDefinitionBuilder( |
| 34 ScriptState*, | 34 ScriptState*, |
| 35 CustomElementRegistry*, | 35 CustomElementRegistry*, |
| 36 const ScriptValue& constructor_script_value, | 36 const ScriptValue& constructor_script_value, |
| 37 ExceptionState&); | 37 ExceptionState&); |
| 38 ~ScriptCustomElementDefinitionBuilder(); | 38 ~ScriptCustomElementDefinitionBuilder() {} |
| 39 | 39 |
| 40 bool CheckConstructorIntrinsics() override; | 40 bool CheckConstructorIntrinsics() override; |
| 41 bool CheckConstructorNotRegistered() override; | 41 bool CheckConstructorNotRegistered() override; |
| 42 bool CheckPrototype() override; | 42 bool CheckPrototype() override; |
| 43 bool RememberOriginalProperties() override; | 43 bool RememberOriginalProperties() override; |
| 44 CustomElementDefinition* Build(const CustomElementDescriptor&) override; | 44 CustomElementDefinition* Build(const CustomElementDescriptor&, |
| 45 CustomElementDefinition::Id) override; |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 static ScriptCustomElementDefinitionBuilder* stack_; | 48 static ScriptCustomElementDefinitionBuilder* stack_; |
| 48 | 49 |
| 49 ScriptCustomElementDefinitionBuilder* prev_; | |
| 50 RefPtr<ScriptState> script_state_; | 50 RefPtr<ScriptState> script_state_; |
| 51 Member<CustomElementRegistry> registry_; | 51 Member<CustomElementRegistry> registry_; |
| 52 v8::Local<v8::Value> constructor_value_; | 52 v8::Local<v8::Value> constructor_value_; |
| 53 v8::Local<v8::Object> constructor_; | 53 v8::Local<v8::Object> constructor_; |
| 54 v8::Local<v8::Object> prototype_; | 54 v8::Local<v8::Object> prototype_; |
| 55 v8::Local<v8::Function> connected_callback_; | 55 v8::Local<v8::Function> connected_callback_; |
| 56 v8::Local<v8::Function> disconnected_callback_; | 56 v8::Local<v8::Function> disconnected_callback_; |
| 57 v8::Local<v8::Function> adopted_callback_; | 57 v8::Local<v8::Function> adopted_callback_; |
| 58 v8::Local<v8::Function> attribute_changed_callback_; | 58 v8::Local<v8::Function> attribute_changed_callback_; |
| 59 HashSet<AtomicString> observed_attributes_; | 59 HashSet<AtomicString> observed_attributes_; |
| 60 ExceptionState& exception_state_; | 60 ExceptionState& exception_state_; |
| 61 | 61 |
| 62 bool ValueForName(const v8::Local<v8::Object>&, | 62 bool ValueForName(v8::Isolate*, |
| 63 v8::Local<v8::Context>&, |
| 64 const v8::TryCatch&, |
| 65 const v8::Local<v8::Object>&, |
| 63 const StringView&, | 66 const StringView&, |
| 64 v8::Local<v8::Value>&) const; | 67 v8::Local<v8::Value>&) const; |
| 65 bool CallableForName(const StringView&, v8::Local<v8::Function>&) const; | 68 bool CallableForName(v8::Isolate*, |
| 66 bool RetrieveObservedAttributes(); | 69 v8::Local<v8::Context>&, |
| 70 const v8::TryCatch&, |
| 71 const StringView&, |
| 72 v8::Local<v8::Function>&) const; |
| 73 bool RetrieveObservedAttributes(v8::Isolate*, |
| 74 v8::Local<v8::Context>&, |
| 75 const v8::TryCatch&); |
| 67 }; | 76 }; |
| 68 | 77 |
| 69 } // namespace blink | 78 } // namespace blink |
| 70 | 79 |
| 71 #endif // ScriptCustomElementDefinitionBuilder_h | 80 #endif // ScriptCustomElementDefinitionBuilder_h |
| OLD | NEW |