| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ElementVisibilityObserver_h | 5 #ifndef ElementVisibilityObserver_h |
| 6 #define ElementVisibilityObserver_h | 6 #define ElementVisibilityObserver_h |
| 7 | 7 |
| 8 #include "core/dom/IntersectionObserver.h" | 8 #include "core/dom/IntersectionObserver.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "platform/heap/Member.h" | 10 #include "platform/heap/Member.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void start(); | 33 void start(); |
| 34 void stop(); | 34 void stop(); |
| 35 | 35 |
| 36 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 class ElementVisibilityCallback; | 39 class ElementVisibilityCallback; |
| 40 | 40 |
| 41 void onVisibilityChanged(const HeapVector<Member<IntersectionObserverEntry>>
&); | 41 void onVisibilityChanged(const HeapVector<Member<IntersectionObserverEntry>>
&); |
| 42 | 42 |
| 43 Member<Element> m_element; | 43 WeakMember<Element> m_element; |
| 44 Member<IntersectionObserver> m_intersectionObserver; | 44 Member<IntersectionObserver> m_intersectionObserver; |
| 45 std::unique_ptr<VisibilityCallback> m_callback; | 45 std::unique_ptr<VisibilityCallback> m_callback; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace blink | 48 } // namespace blink |
| 49 | 49 |
| 50 #endif // ElementVisibilityObserver_h | 50 #endif // ElementVisibilityObserver_h |
| OLD | NEW |