Index: third_party/WebKit/Source/core/observer/ResizeObservation.h |
diff --git a/third_party/WebKit/Source/core/observer/ResizeObservation.h b/third_party/WebKit/Source/core/observer/ResizeObservation.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d8cf920c246df0ae6d04d04a504304de8ec71da5 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/observer/ResizeObservation.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2016 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 ResizeObservation_h |
+#define ResizeObservation_h |
+ |
+#include "core/observer/ResizeObserverEntry.h" |
+#include "platform/geometry/LayoutSize.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace blink { |
+ |
+class Element; |
+class ResizeObserver; |
+ |
+// ResizeObservation represents an element that is being observed. |
+class ResizeObservation : public GarbageCollectedFinalized<ResizeObservation> { |
szager1
2016/06/02 20:52:41
No Finalized, no destructor; see preceding comment
atotic1
2016/06/08 18:59:21
Done.
|
+ |
szager1
2016/06/02 20:52:41
Still too many blank lines.
atotic1
2016/06/08 18:59:21
Done.
|
+public: |
+ ResizeObservation(Element* target, ResizeObserver*); |
+ |
+ virtual ~ResizeObservation() {}; |
+ |
+ // True if target was resized since last broadcast |
+ bool hasResized() const; |
+ |
+ Element* target() const { return m_target; } |
+ |
+ LayoutSize broadcastSize() const { return m_broadcastSize; } |
+ |
+ void setBroadcastSize(const LayoutSize& size) { m_broadcastSize = size; } |
+ |
+ DECLARE_TRACE(); |
+ |
+private: |
+ |
+ WeakMember<Element> m_target; |
+ Member<ResizeObserver> m_observer; // Used for GC only. |
szager1
2016/06/02 20:52:41
// This member is unused; its purpose is to mainta
atotic1
2016/06/08 18:59:21
Done.
|
+ |
+ LayoutSize m_broadcastSize; |
+}; |
+ |
+ |
+ |
+} // namespace blink |
+ |
+#endif // ResizeObservation_h |