Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DOMTimerCoordinator_h | 5 #ifndef DOMTimerCoordinator_h |
| 6 #define DOMTimerCoordinator_h | 6 #define DOMTimerCoordinator_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "wtf/Noncopyable.h" | 9 #include "wtf/Noncopyable.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 // repeating timers, are throttled. Timer nesting level tracks the | 42 // repeating timers, are throttled. Timer nesting level tracks the |
| 43 // number of linked timers or repetitions of a timer. See | 43 // number of linked timers or repetitions of a timer. See |
| 44 // https://html.spec.whatwg.org/#timers | 44 // https://html.spec.whatwg.org/#timers |
| 45 int timerNestingLevel() { return m_timerNestingLevel; } | 45 int timerNestingLevel() { return m_timerNestingLevel; } |
| 46 | 46 |
| 47 // Sets the timer nesting level. Set when a timer executes so that | 47 // Sets the timer nesting level. Set when a timer executes so that |
| 48 // any timers created while the timer is executing will incur a | 48 // any timers created while the timer is executing will incur a |
| 49 // deeper timer nesting level, see DOMTimer::DOMTimer. | 49 // deeper timer nesting level, see DOMTimer::DOMTimer. |
| 50 void setTimerNestingLevel(int level) { m_timerNestingLevel = level; } | 50 void setTimerNestingLevel(int level) { m_timerNestingLevel = level; } |
| 51 | 51 |
| 52 void trace(Visitor*); // Oilpan. | 52 DECLARE_TRACE(); // Oilpan. |
|
haraken
2015/02/24 08:47:26
Remove the comment.
| |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 int nextID(); | 55 int nextID(); |
| 56 | 56 |
| 57 using TimeoutMap = WillBeHeapHashMap<int, RefPtrWillBeMember<DOMTimer>>; | 57 using TimeoutMap = WillBeHeapHashMap<int, RefPtrWillBeMember<DOMTimer>>; |
| 58 TimeoutMap m_timers; | 58 TimeoutMap m_timers; |
| 59 | 59 |
| 60 int m_circularSequentialID; | 60 int m_circularSequentialID; |
| 61 int m_timerNestingLevel; | 61 int m_timerNestingLevel; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| 65 | 65 |
| 66 #endif // DOMTimerCoordinator_h | 66 #endif // DOMTimerCoordinator_h |
| OLD | NEW |