| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/renderer_host/media/audio_output_device_enumerator.h" | 5 #include "content/browser/renderer_host/media/audio_output_device_enumerator.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "media/audio/audio_device_description.h" | 12 #include "media/audio/audio_device_description.h" |
| 13 #include "media/audio/audio_manager.h" | 13 #include "media/audio/audio_manager.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 AudioOutputDeviceEnumeration EnumerateDevicesOnDeviceThread( | 19 AudioOutputDeviceEnumeration EnumerateDevicesOnDeviceThread( |
| 20 media::AudioManager* audio_manager) { | 20 media::AudioManager* audio_manager) { |
| 21 DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread()); | 21 DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread()); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return ++current_event_sequence_; | 147 return ++current_event_sequence_; |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool AudioOutputDeviceEnumerator::IsLastEnumerationValid() const { | 150 bool AudioOutputDeviceEnumerator::IsLastEnumerationValid() const { |
| 151 DCHECK(thread_checker_.CalledOnValidThread()); | 151 DCHECK(thread_checker_.CalledOnValidThread()); |
| 152 return seq_last_enumeration_ > seq_last_invalidation_ && | 152 return seq_last_enumeration_ > seq_last_invalidation_ && |
| 153 !is_enumeration_ongoing_; | 153 !is_enumeration_ongoing_; |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace content | 156 } // namespace content |
| OLD | NEW |