| Index: third_party/WebKit/Source/core/dom/IntersectionObservationRegistry.h
|
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservationRegistry.h b/third_party/WebKit/Source/core/dom/IntersectionObservationRegistry.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b4fa091240f340dff85a6009ea6fe6085bae645e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObservationRegistry.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IntersectionObservationRegistry_h
|
| +#define IntersectionObservationRegistry_h
|
| +
|
| +#include "core/dom/Element.h"
|
| +#include "core/dom/IntersectionObserver.h"
|
| +#include "platform/Timer.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "wtf/HashSet.h"
|
| +#include "wtf/RefCounted.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class Document;
|
| +template<typename T> class Timer;
|
| +
|
| +typedef HeapHashSet<Member<IntersectionObserver>> IntersectionObserverHashSet;
|
| +
|
| +class IntersectionObservationRegistry : public GarbageCollectedFinalized<IntersectionObservationRegistry> {
|
| +public:
|
| + IntersectionObservationRegistry(Timer<Document>&);
|
| +
|
| + void activateIntersectionObserver(IntersectionObserver&);
|
| + void resumeSuspendedIntersectionObservers();
|
| + void deliverIntersectionObservations();
|
| + void clearIntersectionObservations();
|
| + void computeIntersectionObservations();
|
| + void addObservation(IntersectionObservation&);
|
| + void removeObservation(IntersectionObservation&);
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| +private:
|
| + Timer<Document>& m_timer;
|
| + Member<IntersectionObserverHashSet> m_activeIntersectionObservers;
|
| + Member<IntersectionObserverHashSet> m_suspendedIntersectionObservers;
|
| + Member<IntersectionObservation::HashSet> m_intersectionObservations;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // IntersectionObservationRegistry_h
|
|
|