Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ResizeObservation_h | |
| 6 #define ResizeObservation_h | |
| 7 | |
| 8 #include "core/observer/ResizeObserverEntry.h" | |
| 9 #include "platform/geometry/LayoutSize.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class Element; | |
| 15 class ResizeObserver; | |
| 16 | |
| 17 // ResizeObservation represents an element that is being observed. | |
| 18 class ResizeObservation : public GarbageCollected<ResizeObservation> { | |
|
esprehn
2016/07/21 17:52:28
final
atotic1
2016/07/21 19:15:00
Done.
| |
| 19 public: | |
| 20 ResizeObservation(Element* target, ResizeObserver*); | |
| 21 | |
| 22 Element* target() const { return m_target; } | |
| 23 | |
| 24 DECLARE_TRACE(); | |
| 25 | |
| 26 private: | |
| 27 WeakMember<Element> m_target; | |
| 28 // m_observer only purpose is to maintain a strong reference | |
| 29 // to the ResizeObserver, to prevent it from being garbage-collected. | |
|
esprehn
2016/07/21 17:52:28
is this still true once you go to a push model?
atotic1
2016/07/21 19:15:00
Good catch, no it is not. Done.
| |
| 30 Member<ResizeObserver> m_observer; | |
| 31 }; | |
| 32 | |
| 33 } // namespace blink | |
| 34 | |
| 35 #endif // ResizeObservation_h | |
| OLD | NEW |