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

Side by Side Diff: sky/engine/core/dom/custom/CustomElementRegistrationContext.h

Issue 885713004: Remove CustomElementDescriptor. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_ 31 #ifndef SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_
32 #define SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_ 32 #define SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_
33 33
34 #include "sky/engine/core/dom/QualifiedName.h" 34 #include "sky/engine/core/dom/QualifiedName.h"
35 #include "sky/engine/core/dom/custom/CustomElementDescriptor.h"
36 #include "sky/engine/core/dom/custom/CustomElementRegistry.h" 35 #include "sky/engine/core/dom/custom/CustomElementRegistry.h"
37 #include "sky/engine/platform/heap/Handle.h" 36 #include "sky/engine/platform/heap/Handle.h"
38 #include "sky/engine/wtf/HashMap.h" 37 #include "sky/engine/wtf/HashMap.h"
39 #include "sky/engine/wtf/PassOwnPtr.h" 38 #include "sky/engine/wtf/PassOwnPtr.h"
40 #include "sky/engine/wtf/PassRefPtr.h" 39 #include "sky/engine/wtf/PassRefPtr.h"
41 #include "sky/engine/wtf/text/AtomicString.h" 40 #include "sky/engine/wtf/text/AtomicString.h"
42 41
43 namespace blink { 42 namespace blink {
44 43
45 class CustomElementConstructorBuilder; 44 class CustomElementConstructorBuilder;
46 class Document; 45 class Document;
47 class Element; 46 class Element;
48 class ExceptionState; 47 class ExceptionState;
49 48
50 class CustomElementRegistrationContext final : public RefCounted<CustomElementRe gistrationContext> { 49 class CustomElementRegistrationContext final : public RefCounted<CustomElementRe gistrationContext> {
51 public: 50 public:
52 static PassRefPtr<CustomElementRegistrationContext> create() 51 static PassRefPtr<CustomElementRegistrationContext> create()
53 { 52 {
54 return adoptRef(new CustomElementRegistrationContext()); 53 return adoptRef(new CustomElementRegistrationContext());
55 } 54 }
56 55
57 ~CustomElementRegistrationContext() { } 56 ~CustomElementRegistrationContext() { }
58 57
59 // Definitions 58 // Definitions
60 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom icString& type, ExceptionState&); 59 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom icString& type, ExceptionState&);
61 60
62 PassRefPtr<Element> createCustomTagElement(Document&, const QualifiedName&); 61 PassRefPtr<Element> createCustomTagElement(Document&, const QualifiedName&);
63 62
64 void resolve(Element*, const CustomElementDescriptor&); 63 void resolve(Element*);
65 64
66 protected: 65 protected:
67 CustomElementRegistrationContext(); 66 CustomElementRegistrationContext();
68 67
69 private: 68 private:
70 void resolveOrScheduleResolution(Element*); 69 void resolveOrScheduleResolution(Element*);
71 70
72 CustomElementRegistry m_registry; 71 CustomElementRegistry m_registry;
73 }; 72 };
74 73
75 } 74 }
76 75
77 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_ 76 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTREGISTRATIONCONTEXT_H_
78 77
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698