| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "webrtc/base/taskrunner.h" | 13 #include "webrtc/base/taskrunner.h" |
| 14 | 14 |
| 15 #include "webrtc/base/common.h" | 15 #include "webrtc/base/common.h" |
| 16 #include "webrtc/base/scoped_ptr.h" | |
| 17 #include "webrtc/base/task.h" | 16 #include "webrtc/base/task.h" |
| 18 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 19 | 18 |
| 20 namespace rtc { | 19 namespace rtc { |
| 21 | 20 |
| 22 TaskRunner::TaskRunner() | 21 TaskRunner::TaskRunner() |
| 23 : TaskParent(this), | 22 : TaskParent(this), |
| 24 next_timeout_task_(NULL), | 23 next_timeout_task_(NULL), |
| 25 tasks_running_(false) | 24 tasks_running_(false) |
| 26 #if !defined(NDEBUG) | 25 #if !defined(NDEBUG) |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 bool timeout_change = (previous_timeout_time == 0 && next_timeout != 0) || | 214 bool timeout_change = (previous_timeout_time == 0 && next_timeout != 0) || |
| 216 next_timeout < previous_timeout_time || | 215 next_timeout < previous_timeout_time || |
| 217 (previous_timeout_time <= CurrentTime() && | 216 (previous_timeout_time <= CurrentTime() && |
| 218 previous_timeout_time != next_timeout); | 217 previous_timeout_time != next_timeout); |
| 219 if (timeout_change) { | 218 if (timeout_change) { |
| 220 OnTimeoutChange(); | 219 OnTimeoutChange(); |
| 221 } | 220 } |
| 222 } | 221 } |
| 223 | 222 |
| 224 } // namespace rtc | 223 } // namespace rtc |
| OLD | NEW |