1 // Copyright 2019 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 THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_FACTORY_H_ 6 #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_FACTORY_H_ 7 8 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" 9 #include "third_party/blink/renderer/platform/wtf/forward.h" 10 11 namespace blink { 12 13 class CustomElementDefinition; 14 class CustomElementReaction; 15 class Document; 16 class FileOrUSVStringOrFormData; 17 class HTMLFormElement; 18 class QualifiedName; 19 20 class CustomElementReactionFactory { 21 STATIC_ONLY(CustomElementReactionFactory); 22 23 public: 24 static CustomElementReaction& CreateUpgrade( 25 CustomElementDefinition& definition, 26 bool upgrade_invisible_elements); 27 static CustomElementReaction& CreateConnected( 28 CustomElementDefinition& definition); 29 static CustomElementReaction& CreateDisconnected( 30 CustomElementDefinition& definition); 31 static CustomElementReaction& CreateAdopted( 32 CustomElementDefinition& definition, 33 Document& old_owner, 34 Document& new_owner); 35 static CustomElementReaction& CreateAttributeChanged( 36 CustomElementDefinition& definition, 37 const QualifiedName& name, 38 const AtomicString& old_value, 39 const AtomicString& new_value); 40 static CustomElementReaction& CreateFormAssociated( 41 CustomElementDefinition& definition, 42 HTMLFormElement* nullable_form); 43 static CustomElementReaction& CreateFormReset( 44 CustomElementDefinition& definition); 45 static CustomElementReaction& CreateFormDisabled( 46 CustomElementDefinition& definition, 47 bool is_disabled); 48 static CustomElementReaction& CreateFormStateRestore( 49 CustomElementDefinition& definition, 50 const FileOrUSVStringOrFormData& value, 51 const String& mode); 52 }; 53 54 } // namespace blink 55 56 #endif // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CUSTOM_CUSTOM_ELEMENT_REACTION_FACTORY_H_ 57