| 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 CustomElementReactionQueue_h | 5 #ifndef CustomElementReactionQueue_h |
| 6 #define CustomElementReactionQueue_h | 6 #define CustomElementReactionQueue_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Noncopyable.h" | |
| 11 | 10 |
| 12 namespace blink { | 11 namespace blink { |
| 13 | 12 |
| 14 class CustomElementReaction; | 13 class CustomElementReaction; |
| 15 class Element; | 14 class Element; |
| 16 | 15 |
| 17 class CORE_EXPORT CustomElementReactionQueue final | 16 class CORE_EXPORT CustomElementReactionQueue final |
| 18 : public GarbageCollectedFinalized<CustomElementReactionQueue> { | 17 : public GarbageCollectedFinalized<CustomElementReactionQueue> { |
| 19 WTF_MAKE_NONCOPYABLE(CustomElementReactionQueue); | 18 DISALLOW_COPY_AND_ASSIGN(CustomElementReactionQueue); |
| 20 public: | 19 public: |
| 21 CustomElementReactionQueue(); | 20 CustomElementReactionQueue(); |
| 22 ~CustomElementReactionQueue(); | 21 ~CustomElementReactionQueue(); |
| 23 | 22 |
| 24 DECLARE_TRACE(); | 23 DECLARE_TRACE(); |
| 25 | 24 |
| 26 void add(CustomElementReaction*); | 25 void add(CustomElementReaction*); |
| 27 void invokeReactions(Element*); | 26 void invokeReactions(Element*); |
| 28 bool isEmpty() { return m_reactions.isEmpty(); } | 27 bool isEmpty() { return m_reactions.isEmpty(); } |
| 29 | 28 |
| 30 private: | 29 private: |
| 31 HeapVector<Member<CustomElementReaction>, 1> m_reactions; | 30 HeapVector<Member<CustomElementReaction>, 1> m_reactions; |
| 32 size_t m_index; | 31 size_t m_index; |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 } // namespace blink | 34 } // namespace blink |
| 36 | 35 |
| 37 #endif // CustomElementReactionQueue_h | 36 #endif // CustomElementReactionQueue_h |
| OLD | NEW |