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 IntersectionObserverEntry_h |
| 6 #define IntersectionObserverEntry_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/ClientRect.h" |
| 10 #include "core/dom/ClientRectList.h" |
| 11 #include "platform/geometry/FloatRect.h" |
| 12 #include "platform/heap/Handle.h" |
| 13 #include "wtf/Vector.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class Element; |
| 18 |
| 19 class IntersectionObserverEntry : public RefCountedWillBeGarbageCollectedFinaliz
ed<IntersectionObserverEntry>, public ScriptWrappable { |
| 20 DEFINE_WRAPPERTYPEINFO(); |
| 21 public: |
| 22 static PassRefPtrWillBeRawPtr<IntersectionObserverEntry> create(double, cons
t Vector<FloatRect>&, const FloatRect&, Element*); |
| 23 |
| 24 ~IntersectionObserverEntry(); |
| 25 |
| 26 double time() { return m_time; } |
| 27 ClientRectList* quads() { return ClientRectList::create(m_quads); } |
| 28 ClientRect* viewport() { return ClientRect::create(m_viewport); } |
| 29 Element* target() { return m_target.get(); } |
| 30 |
| 31 DECLARE_VIRTUAL_TRACE(); |
| 32 |
| 33 protected: |
| 34 IntersectionObserverEntry(double, const Vector<FloatRect>&, const FloatRect&
, Element*); |
| 35 |
| 36 private: |
| 37 const double m_time; |
| 38 const Vector<FloatRect> m_quads; |
| 39 const FloatRect m_viewport; |
| 40 const RefPtrWillBeMember<Element> m_target; |
| 41 }; |
| 42 |
| 43 } // namespace blink |
| 44 |
| 45 #endif // IntersectionObserverEntry_h |
OLD | NEW |