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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.h

Issue 1952893003: Implement custom element construction and some 'define' checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use DCHECK, revert RuntimeEnabledFeatures.in. Created 4 years, 7 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 class V0CustomElementConstructorBuilder; 45 class V0CustomElementConstructorBuilder;
46 class ExceptionState; 46 class ExceptionState;
47 47
48 class V0CustomElementRegistry final { 48 class V0CustomElementRegistry final {
49 WTF_MAKE_NONCOPYABLE(V0CustomElementRegistry); 49 WTF_MAKE_NONCOPYABLE(V0CustomElementRegistry);
50 DISALLOW_NEW(); 50 DISALLOW_NEW();
51 public: 51 public:
52 DECLARE_TRACE(); 52 DECLARE_TRACE();
53 void documentWasDetached() { m_documentWasDetached = true; } 53 void documentWasDetached() { m_documentWasDetached = true; }
54 bool nameIsDefined(const AtomicString&) const;
54 55
55 protected: 56 protected:
56 friend class V0CustomElementRegistrationContext; 57 friend class V0CustomElementRegistrationContext;
57 58
58 V0CustomElementRegistry() : m_documentWasDetached(false) { } 59 V0CustomElementRegistry() : m_documentWasDetached(false) { }
59 60
60 V0CustomElementDefinition* registerElement(Document*, V0CustomElementConstru ctorBuilder*, const AtomicString& name, V0CustomElement::NameSet validNames, Exc eptionState&); 61 V0CustomElementDefinition* registerElement(Document*, V0CustomElementConstru ctorBuilder*, const AtomicString& name, V0CustomElement::NameSet validNames, Exc eptionState&);
61 V0CustomElementDefinition* find(const V0CustomElementDescriptor&) const; 62 V0CustomElementDefinition* find(const V0CustomElementDescriptor&) const;
62 63
63 private: 64 private:
64 typedef HeapHashMap<V0CustomElementDescriptor, Member<V0CustomElementDefinit ion>> DefinitionMap; 65 typedef HeapHashMap<V0CustomElementDescriptor, Member<V0CustomElementDefinit ion>> DefinitionMap;
65 DefinitionMap m_definitions; 66 DefinitionMap m_definitions;
66 HashSet<AtomicString> m_registeredTypeNames; 67 HashSet<AtomicString> m_registeredTypeNames;
67 bool m_documentWasDetached; 68 bool m_documentWasDetached;
68 }; 69 };
69 70
70 } // namespace blink 71 } // namespace blink
71 72
72 #endif // V0CustomElementRegistry_h 73 #endif // V0CustomElementRegistry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698