Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: third_party/WebKit/Source/core/observer/ResizeObservation.h

Issue 2161313002: ResizeObserver implementation, part 2: lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b1a3f796b2a189dd69be6bd91829aa2b76d9415b
--- /dev/null
+++ b/third_party/WebKit/Source/core/observer/ResizeObservation.h
@@ -0,0 +1,34 @@
+// 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 final : public GarbageCollected<ResizeObservation> {
+public:
+ ResizeObservation(Element* target, ResizeObserver*);
+
+ Element* target() const { return m_target; }
+
+ DECLARE_TRACE();
+
+private:
+ WeakMember<Element> m_target;
+
+ Member<ResizeObserver> m_observer;
+};
+
+} // namespace blink
+
+#endif // ResizeObservation_h
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementRareData.cpp ('k') | third_party/WebKit/Source/core/observer/ResizeObservation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698