Chromium Code Reviews| 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 IntersectionObserverController_h | |
| 6 #define IntersectionObserverController_h | |
| 7 | |
| 8 #include "core/dom/Element.h" | |
| 9 #include "core/dom/IntersectionObserver.h" | |
| 10 #include "platform/Timer.h" | |
| 11 #include "platform/heap/Handle.h" | |
| 12 #include "wtf/HashSet.h" | |
| 13 #include "wtf/RefCounted.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class Document; | |
| 18 template<typename T> class Timer; | |
| 19 | |
| 20 class IntersectionObserverController : public GarbageCollectedFinalized<Intersec tionObserverController> { | |
| 21 public: | |
| 22 IntersectionObserverController(); | |
|
esprehn
2015/12/17 01:40:29
also destructor, and put it in the .cpp file
szager1
2015/12/17 20:27:26
Done.
| |
| 23 | |
| 24 void scheduleIntersectionObserverForDelivery(IntersectionObserver&); | |
| 25 void resumeSuspendedIntersectionObservers(); | |
| 26 void deliverIntersectionObservations(Timer<IntersectionObserverController>*) ; | |
| 27 void computeTrackedIntersectionObservations(); | |
| 28 void addTrackedObserver(IntersectionObserver&); | |
| 29 void removeTrackedObserversForRoot(Element&); | |
| 30 void dispose(); | |
| 31 | |
| 32 DECLARE_TRACE(); | |
| 33 | |
| 34 private: | |
| 35 Timer<IntersectionObserverController> m_timer; | |
| 36 // IntersectionObservers for which this is the tracking document. | |
| 37 HeapHashSet<WeakMember<IntersectionObserver>> m_trackedIntersectionObservers ; | |
| 38 // IntersectionObservers for which this is the execution context of the call back. | |
| 39 HeapHashSet<Member<IntersectionObserver>> m_activeIntersectionObservers; | |
| 40 HeapHashSet<Member<IntersectionObserver>> m_suspendedIntersectionObservers; | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // IntersectionObservationRegistry_h | |
| OLD | NEW |