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

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: 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..7a666d0160a93970fbe2a286c75b7e5b2746898d
--- /dev/null
+++ b/third_party/WebKit/Source/core/observer/ResizeObserverController.h
@@ -0,0 +1,35 @@
+// 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 : public GarbageCollected<ResizeObserverController> {
esprehn 2016/07/21 17:52:29 final
atotic1 2016/07/21 19:15:00 Done.
+
esprehn 2016/07/21 17:52:29 remove blank line
atotic1 2016/07/21 19:15:00 Done.
+public:
+
esprehn 2016/07/21 17:52:29 you don't need all these blank lines around the pu
atotic1 2016/07/21 19:15:00 Done.
+ ResizeObserverController();
+
+ void addObserver(ResizeObserver&);
+
+ DECLARE_TRACE();
+
+private:
+
+ using ObserverSet = HeapHashSet<WeakMember<ResizeObserver>>;
esprehn 2016/07/21 17:52:29 remove
atotic1 2016/07/21 19:15:00 I prefer naming complex containers. It spares me f
+ // Active observers
+ ObserverSet m_observers;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698