OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ElementIntersectionObserverData_h | |
6 #define ElementIntersectionObserverData_h | |
7 | |
8 #include "core/dom/IntersectionObservation.h" | |
esprehn
2015/12/17 01:40:28
you can forward declare IntersectionObservation if
szager1
2015/12/17 20:27:25
Yep, it works, done.
| |
9 #include "core/dom/IntersectionObserver.h" | |
esprehn
2015/12/17 01:40:28
ditto
szager1
2015/12/17 20:27:25
Done.
| |
10 | |
11 namespace blink { | |
12 | |
13 class ElementIntersectionObserverData : public GarbageCollectedFinalized<Element IntersectionObserverData> { | |
14 public: | |
15 DECLARE_TRACE(); | |
16 ElementIntersectionObserverData() { } | |
esprehn
2015/12/17 01:40:28
can we put both the constructor and the destructor
szager1
2015/12/17 20:27:25
Done.
| |
17 | |
18 bool hasIntersectionObserver() const; | |
19 bool hasIntersectionObservation() const; | |
20 bool hasObservationFor(IntersectionObserver&) const; | |
21 void addObservation(IntersectionObservation&); | |
22 void removeObservation(IntersectionObserver&); | |
23 void activateValidIntersectionObservers(Element&); | |
24 void deactivateAllIntersectionObservers(Element&); | |
25 | |
26 #if !ENABLE(OILPAN) | |
27 void dispose(); | |
28 #endif | |
29 | |
30 WeakPtr<Element> createWeakPtr(Element*); | |
31 | |
32 private: | |
33 // IntersectionObservers for which the Element owning this data is root. | |
34 HeapHashSet<WeakMember<IntersectionObserver>> m_intersectionObservers; | |
35 // IntersectionObservations for which the Element owning this data is target . | |
36 HeapHashMap<Member<IntersectionObserver>, Member<IntersectionObservation>> m _intersectionObservations; | |
37 | |
38 #if !ENABLE(OILPAN) | |
39 OwnPtrWillBeMember<WeakPtrFactory<Element>> m_weakPointerFactory; | |
40 #endif | |
41 }; | |
42 | |
43 } // namespace blink { | |
44 | |
45 #endif // ElementIntersectionObserverData_h | |
OLD | NEW |