OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 "webrtc/base/task_queue.h" | 11 #include "webrtc/rtc_base/task_queue.h" |
12 | 12 |
13 #include <mmsystem.h> | 13 #include <mmsystem.h> |
14 #include <string.h> | 14 #include <string.h> |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 #include <queue> | 17 #include <queue> |
18 | 18 |
19 #include "webrtc/base/arraysize.h" | 19 #include "webrtc/rtc_base/arraysize.h" |
20 #include "webrtc/base/checks.h" | 20 #include "webrtc/rtc_base/checks.h" |
21 #include "webrtc/base/logging.h" | 21 #include "webrtc/rtc_base/logging.h" |
22 #include "webrtc/base/safe_conversions.h" | 22 #include "webrtc/rtc_base/safe_conversions.h" |
23 #include "webrtc/base/timeutils.h" | 23 #include "webrtc/rtc_base/timeutils.h" |
24 | 24 |
25 namespace rtc { | 25 namespace rtc { |
26 namespace { | 26 namespace { |
27 #define WM_RUN_TASK WM_USER + 1 | 27 #define WM_RUN_TASK WM_USER + 1 |
28 #define WM_QUEUE_DELAYED_TASK WM_USER + 2 | 28 #define WM_QUEUE_DELAYED_TASK WM_USER + 2 |
29 | 29 |
30 using Priority = TaskQueue::Priority; | 30 using Priority = TaskQueue::Priority; |
31 | 31 |
32 DWORD g_queue_ptr_tls = 0; | 32 DWORD g_queue_ptr_tls = 0; |
33 | 33 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 void TaskQueue::ThreadState::CancelTimers() { | 407 void TaskQueue::ThreadState::CancelTimers() { |
408 timer_.Cancel(); | 408 timer_.Cancel(); |
409 if (timer_id_) { | 409 if (timer_id_) { |
410 ::KillTimer(nullptr, timer_id_); | 410 ::KillTimer(nullptr, timer_id_); |
411 timer_id_ = 0; | 411 timer_id_ = 0; |
412 } | 412 } |
413 } | 413 } |
414 | 414 |
415 } // namespace rtc | 415 } // namespace rtc |
OLD | NEW |