| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SlotAssignment_h | 5 #ifndef SlotAssignment_h |
| 6 #define SlotAssignment_h | 6 #define SlotAssignment_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class HTMLSlotElement; | 12 class HTMLSlotElement; |
| 13 class Node; | 13 class Node; |
| 14 class ShadowRoot; | 14 class ShadowRoot; |
| 15 | 15 |
| 16 class SlotAssignment final : public GarbageCollected<SlotAssignment> { | 16 class SlotAssignment final : public GarbageCollected<SlotAssignment> { |
| 17 public: | 17 public: |
| 18 static SlotAssignment* create() | 18 static SlotAssignment* create() |
| 19 { | 19 { |
| 20 return new SlotAssignment; | 20 return new SlotAssignment; |
| 21 } | 21 } |
| 22 | 22 |
| 23 HTMLSlotElement* assignedSlotFor(const Node&) const; | 23 HTMLSlotElement* assignedSlotFor(const Node&) const; |
| 24 void resolveAssignment(ShadowRoot&); | 24 void resolveAssignment(ShadowRoot&); |
| 25 void resolveDistribution(ShadowRoot&); |
| 25 | 26 |
| 26 DECLARE_TRACE(); | 27 DECLARE_TRACE(); |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 SlotAssignment() { } | 30 SlotAssignment() { } |
| 30 | 31 |
| 31 void assign(Node&, HTMLSlotElement&); | 32 void assign(Node&, HTMLSlotElement&); |
| 33 void distribute(Node&, HTMLSlotElement&); |
| 32 HeapHashMap<Member<Node>, Member<HTMLSlotElement>> m_assignment; | 34 HeapHashMap<Member<Node>, Member<HTMLSlotElement>> m_assignment; |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 } // namespace blink | 37 } // namespace blink |
| 36 | 38 |
| 37 #endif // HTMLSlotAssignment_h | 39 #endif // HTMLSlotAssignment_h |
| OLD | NEW |