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 "core/frame/DOMTimerCoordinator.h" | 5 #include "core/frame/DOMTimerCoordinator.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 #include <memory> |
7 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
8 #include "core/frame/DOMTimer.h" | 10 #include "core/frame/DOMTimer.h" |
9 #include <algorithm> | |
10 #include <memory> | |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 DOMTimerCoordinator::DOMTimerCoordinator( | 14 DOMTimerCoordinator::DOMTimerCoordinator( |
15 RefPtr<WebTaskRunner> timer_task_runner) | 15 RefPtr<WebTaskRunner> timer_task_runner) |
16 : circular_sequential_id_(0), | 16 : circular_sequential_id_(0), |
17 timer_nesting_level_(0), | 17 timer_nesting_level_(0), |
18 timer_task_runner_(std::move(timer_task_runner)) {} | 18 timer_task_runner_(std::move(timer_task_runner)) {} |
19 | 19 |
20 int DOMTimerCoordinator::InstallNewTimeout(ExecutionContext* context, | 20 int DOMTimerCoordinator::InstallNewTimeout(ExecutionContext* context, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return circular_sequential_id_; | 59 return circular_sequential_id_; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 void DOMTimerCoordinator::SetTimerTaskRunner( | 63 void DOMTimerCoordinator::SetTimerTaskRunner( |
64 RefPtr<WebTaskRunner> timer_task_runner) { | 64 RefPtr<WebTaskRunner> timer_task_runner) { |
65 timer_task_runner_ = std::move(timer_task_runner); | 65 timer_task_runner_ = std::move(timer_task_runner); |
66 } | 66 } |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
OLD | NEW |