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

Unified Diff: third_party/WebKit/Source/core/observer/ResizeObserverController.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/ResizeObserverController.h
diff --git a/third_party/WebKit/Source/core/observer/ResizeObserverController.h b/third_party/WebKit/Source/core/observer/ResizeObserverController.h
new file mode 100644
index 0000000000000000000000000000000000000000..e84ef621ee747c31a93d6245c504355aaccd05e0
--- /dev/null
+++ b/third_party/WebKit/Source/core/observer/ResizeObserverController.h
@@ -0,0 +1,31 @@
+// 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 ResizeObserverController_h
+#define ResizeObserverController_h
+
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ResizeObserver;
+
+// ResizeObserverController keeps track of all ResizeObservers
+// in a single Document.
+class ResizeObserverController final : public GarbageCollected<ResizeObserverController> {
+public:
+ ResizeObserverController();
+
+ void addObserver(ResizeObserver&);
+
+ DECLARE_TRACE();
+
+private:
+ // Active observers
+ HeapHashSet<WeakMember<ResizeObserver>> m_observers;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698