| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/frame/DOMTimerCoordinator.h" | 6 #include "core/frame/DOMTimerCoordinator.h" |
| 7 | 7 |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/DOMTimer.h" | 9 #include "core/frame/DOMTimer.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 return timeoutID; | 30 return timeoutID; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void DOMTimerCoordinator::removeTimeoutByID(int timeoutID) | 33 void DOMTimerCoordinator::removeTimeoutByID(int timeoutID) |
| 34 { | 34 { |
| 35 if (timeoutID <= 0) | 35 if (timeoutID <= 0) |
| 36 return; | 36 return; |
| 37 | 37 |
| 38 if (DOMTimer* removedTimer = m_timers.get(timeoutID)) | 38 if (DOMTimer* removedTimer = m_timers.get(timeoutID)) |
| 39 removedTimer->dispose(); | 39 removedTimer->disposeTimer(); |
| 40 | 40 |
| 41 m_timers.remove(timeoutID); | 41 m_timers.remove(timeoutID); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void DOMTimerCoordinator::didChangeTimerAlignmentInterval() | 44 void DOMTimerCoordinator::didChangeTimerAlignmentInterval() |
| 45 { | 45 { |
| 46 for (TimeoutMap::iterator iter = m_timers.begin(); iter != m_timers.end(); +
+iter) | 46 for (TimeoutMap::iterator iter = m_timers.begin(); iter != m_timers.end(); +
+iter) |
| 47 iter->value->didChangeAlignmentInterval(); | 47 iter->value->didChangeAlignmentInterval(); |
| 48 } | 48 } |
| 49 | 49 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 if (m_circularSequentialID <= 0) | 62 if (m_circularSequentialID <= 0) |
| 63 m_circularSequentialID = 1; | 63 m_circularSequentialID = 1; |
| 64 | 64 |
| 65 if (!m_timers.contains(m_circularSequentialID)) | 65 if (!m_timers.contains(m_circularSequentialID)) |
| 66 return m_circularSequentialID; | 66 return m_circularSequentialID; |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| OLD | NEW |