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

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

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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..e573dd3ea7af7f65c7f8f2b6dad54f6e6ab1be6e
--- /dev/null
+++ b/third_party/WebKit/Source/core/observer/ResizeObserverController.h
@@ -0,0 +1,43 @@
+// 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 GarbageCollectedFinalized<ResizeObserverController> {
+
+public:
+
+ static const size_t kRenderLoopLimit = 16;
+
+ ResizeObserverController();
+ virtual ~ResizeObserverController() {};
szager1 2016/05/23 19:49:12 Ditto comment about unnecessary destructors.
atotic1 2016/05/25 00:15:54 Done.
+
+ void addObserver(ResizeObserver&);
+
szager1 2016/05/23 19:49:12 Too many blank lines.
atotic1 2016/05/25 00:15:54 Done.
+ void gatherObservations();
+
+ bool hasObservations();
+
+ void deliverObservations();
+
+ DECLARE_TRACE();
+
+private:
+
+ // Active observers
+ HeapHashSet<Member<ResizeObserver>> m_observers;
szager1 2016/05/23 19:49:12 This should probably be HeapHashSet<WeakMember<Res
atotic1 2016/05/25 00:15:54 Done.
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698