OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NodeIntersectionObserverData_h | |
6 #define NodeIntersectionObserverData_h | |
7 | |
8 #include "bindings/core/v8/ScriptWrappable.h" | |
9 #include "bindings/core/v8/TraceWrapperMember.h" | |
10 #include "platform/heap/Handle.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class Node; | |
15 class IntersectionObservation; | |
16 class IntersectionObserver; | |
17 | |
18 class NodeIntersectionObserverData | |
19 : public GarbageCollected<NodeIntersectionObserverData>, | |
20 public TraceWrapperBase { | |
21 public: | |
22 NodeIntersectionObserverData(); | |
23 | |
24 IntersectionObservation* getObservationFor(IntersectionObserver&); | |
25 void addObservation(IntersectionObservation&); | |
26 void removeObservation(IntersectionObserver&); | |
27 void activateValidIntersectionObservers(Node&); | |
28 void deactivateAllIntersectionObservers(Node&); | |
29 | |
30 DECLARE_TRACE(); | |
31 DECLARE_TRACE_WRAPPERS(); | |
32 | |
33 private: | |
34 // IntersectionObservers for which the Node owning this data is root. | |
35 HeapHashSet<WeakMember<IntersectionObserver>> m_intersectionObservers; | |
36 // IntersectionObservations for which the Node owning this data is target. | |
37 HeapHashMap<TraceWrapperMember<IntersectionObserver>, | |
38 Member<IntersectionObservation>> | |
39 m_intersectionObservations; | |
40 }; | |
41 | |
42 } // namespace blink | |
43 | |
44 #endif // NodeIntersectionObserverData_h | |
OLD | NEW |