Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #ifndef WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ | 11 #ifndef WEBRTC_BASE_SWAP_QUEUE_H_ |
| 12 #define WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ | 12 #define WEBRTC_BASE_SWAP_QUEUE_H_ |
| 13 | 13 |
| 14 #include <algorithm> | 14 #include <algorithm> |
| 15 #include <utility> | 15 #include <utility> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/criticalsection.h" | 19 #include "webrtc/base/criticalsection.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 namespace internal { | 23 namespace internal { |
| 24 | 24 |
| 25 // (Internal; please don't use outside this file.) | 25 // (Internal; please don't use outside this file.) |
|
Henrik Grunell WebRTC
2016/03/21 12:24:29
Is this something we want to expose as part of app
terelius
2016/03/23 10:21:02
I think "approved" means primarily "approved for u
| |
| 26 template <typename T> | 26 template <typename T> |
| 27 bool NoopSwapQueueItemVerifierFunction(const T&) { | 27 bool NoopSwapQueueItemVerifierFunction(const T&) { |
| 28 return true; | 28 return true; |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace internal | 31 } // namespace internal |
| 32 | 32 |
| 33 // Functor to use when supplying a verifier function for the queue. | 33 // Functor to use when supplying a verifier function for the queue. |
| 34 template <typename T, | 34 template <typename T, |
| 35 bool (*QueueItemVerifierFunction)(const T&) = | 35 bool (*QueueItemVerifierFunction)(const T&) = |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 size_t num_elements_ GUARDED_BY(crit_queue_) = 0; | 200 size_t num_elements_ GUARDED_BY(crit_queue_) = 0; |
| 201 | 201 |
| 202 // queue_.size() is constant. | 202 // queue_.size() is constant. |
| 203 std::vector<T> queue_ GUARDED_BY(crit_queue_); | 203 std::vector<T> queue_ GUARDED_BY(crit_queue_); |
| 204 | 204 |
| 205 RTC_DISALLOW_COPY_AND_ASSIGN(SwapQueue); | 205 RTC_DISALLOW_COPY_AND_ASSIGN(SwapQueue); |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 } // namespace webrtc | 208 } // namespace webrtc |
| 209 | 209 |
| 210 #endif // WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ | 210 #endif // WEBRTC_BASE_SWAP_QUEUE_H_ |
| OLD | NEW |