| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 #include "wtf/text/AtomicString.h" | 41 #include "wtf/text/AtomicString.h" |
| 42 #include "wtf/text/AtomicStringHash.h" | 42 #include "wtf/text/AtomicStringHash.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class CustomElementConstructorBuilder; | 46 class CustomElementConstructorBuilder; |
| 47 class ExceptionState; | 47 class ExceptionState; |
| 48 | 48 |
| 49 class CustomElementRegistry final { | 49 class CustomElementRegistry final { |
| 50 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); | 50 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); |
| 51 DISALLOW_ALLOCATION(); | 51 DISALLOW_NEW(); |
| 52 public: | 52 public: |
| 53 DECLARE_TRACE(); | 53 DECLARE_TRACE(); |
| 54 void documentWasDetached() { m_documentWasDetached = true; } | 54 void documentWasDetached() { m_documentWasDetached = true; } |
| 55 | 55 |
| 56 protected: | 56 protected: |
| 57 friend class CustomElementRegistrationContext; | 57 friend class CustomElementRegistrationContext; |
| 58 | 58 |
| 59 CustomElementRegistry() : m_documentWasDetached(false) { } | 59 CustomElementRegistry() : m_documentWasDetached(false) { } |
| 60 | 60 |
| 61 CustomElementDefinition* registerElement(Document*, CustomElementConstructor
Builder*, const AtomicString& name, CustomElement::NameSet validNames, Exception
State&); | 61 CustomElementDefinition* registerElement(Document*, CustomElementConstructor
Builder*, const AtomicString& name, CustomElement::NameSet validNames, Exception
State&); |
| 62 CustomElementDefinition* find(const CustomElementDescriptor&) const; | 62 CustomElementDefinition* find(const CustomElementDescriptor&) const; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 typedef WillBeHeapHashMap<CustomElementDescriptor, RefPtrWillBeMember<Custom
ElementDefinition>> DefinitionMap; | 65 typedef WillBeHeapHashMap<CustomElementDescriptor, RefPtrWillBeMember<Custom
ElementDefinition>> DefinitionMap; |
| 66 DefinitionMap m_definitions; | 66 DefinitionMap m_definitions; |
| 67 HashSet<AtomicString> m_registeredTypeNames; | 67 HashSet<AtomicString> m_registeredTypeNames; |
| 68 bool m_documentWasDetached; | 68 bool m_documentWasDetached; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 #endif // CustomElementRegistry_h | 73 #endif // CustomElementRegistry_h |
| OLD | NEW |