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

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

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add missing break, rebaseline, no config.h 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 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();
23 ~IntersectionObserverController();
24
25 void scheduleIntersectionObserverForDelivery(IntersectionObserver&);
26 void resumeSuspendedIntersectionObservers();
27 void deliverIntersectionObservations(Timer<IntersectionObserverController>*) ;
28 void computeTrackedIntersectionObservations();
29 void addTrackedObserver(IntersectionObserver&);
30 void removeTrackedObserversForRoot(Element&);
31 void dispose();
32
33 DECLARE_TRACE();
34
35 private:
36 Timer<IntersectionObserverController> m_timer;
37 // IntersectionObservers for which this is the tracking document.
haraken 2015/12/22 01:13:30 Can you add a link to the dcheng's document (https
szager1 2015/12/22 07:53:41 Added a link to the design doc, which should be th
38 HeapHashSet<WeakMember<IntersectionObserver>> m_trackedIntersectionObservers ;
haraken 2015/12/22 01:13:30 What's the relationship between m_trackedIntersect
esprehn 2015/12/22 07:50:33 Can you and Stefan VC and talk about this? I know
szager1 2015/12/22 07:53:41 m_trackedIntersectionObservers are observers for w
39 // IntersectionObservers for which this is the execution context of the call back.
40 HeapHashSet<Member<IntersectionObserver>> m_activeIntersectionObservers;
41 HeapHashSet<Member<IntersectionObserver>> m_suspendedIntersectionObservers;
42 };
43
44 } // namespace blink
45
46 #endif // IntersectionObservationRegistry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698