Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ResizeObserverController_h | |
| 6 #define ResizeObserverController_h | |
| 7 | |
| 8 #include "platform/heap/Handle.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class ResizeObserver; | |
| 13 | |
| 14 // ResizeObserverController keeps track of all ResizeObservers | |
| 15 // in a single Document. | |
| 16 class ResizeObserverController : public GarbageCollected<ResizeObserverControlle r> { | |
| 17 | |
| 18 public: | |
| 19 | |
| 20 static const size_t kRenderLoopLimit = 16; | |
|
eae
2016/07/13 23:39:47
A comment explaining the limit would be helpful.
atotic1
2016/07/15 01:43:17
This limit will go away in the final checkin.
| |
| 21 | |
| 22 ResizeObserverController(); | |
| 23 | |
| 24 void addObserver(ResizeObserver&); | |
| 25 bool gatherObservations(); | |
| 26 void deliverObservations(); | |
| 27 void clearObservations(); | |
| 28 | |
| 29 DECLARE_TRACE(); | |
| 30 | |
| 31 private: | |
| 32 | |
| 33 using ObserverSet = HeapHashSet<WeakMember<ResizeObserver>>; | |
| 34 // Active observers | |
| 35 ObserverSet m_observers; | |
| 36 }; | |
| 37 | |
| 38 } // namespace blink | |
| 39 | |
| 40 #endif | |
| OLD | NEW |