Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: third_party/WebKit/Source/core/dom/IntersectionObserverRegistry.h

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Refactor clipping code Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 IntersectionObserverRegistry_h
6 #define IntersectionObserverRegistry_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 IntersectionObserverRegistry : public GarbageCollectedFinalized<Intersecti onObserverRegistry> {
21 public:
22 IntersectionObserverRegistry(Timer<Document>&);
23
24 void scheduleIntersectionObserverForDelivery(IntersectionObserver&);
25 void resumeSuspendedIntersectionObservers();
26 void deliverIntersectionObservations();
27 void computeTrackedIntersectionObservations();
28 void addTrackedObserver(IntersectionObserver&);
29 void removeTrackedObserversForRoot(Element*);
30
31 DECLARE_TRACE();
32
33 private:
34 Timer<Document>& m_timer;
35 // IntersectionObservers for which this is the tracking document.
36 Member<IntersectionObserver::WeakHashSet> m_trackedIntersectionObservers;
37 // IntersectionObservers for which this is the execution context of the call back.
38 Member<IntersectionObserver::HashSet> m_activeIntersectionObservers;
39 Member<IntersectionObserver::HashSet> m_suspendedIntersectionObservers;
40 };
41
42 } // namespace blink
43
44 #endif // IntersectionObservationRegistry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698