| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_authorization_handler
.h" | 5 #include "content/browser/renderer_host/media/audio_output_authorization_handler
.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
| 7 #include "base/task_runner_util.h" | 8 #include "base/task_runner_util.h" |
| 8 #include "content/browser/bad_message.h" | 9 #include "content/browser/bad_message.h" |
| 9 #include "content/browser/renderer_host/media/audio_input_device_manager.h" | 10 #include "content/browser/renderer_host/media/audio_input_device_manager.h" |
| 10 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 11 #include "content/public/browser/media_device_id.h" | 12 #include "content/public/browser/media_device_id.h" |
| 12 #include "media/base/limits.h" | 13 #include "media/base/limits.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 media::AudioParameters TryToFixAudioParameters( | 17 media::AudioParameters TryToFixAudioParameters( |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 216 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 216 DCHECK(!raw_device_id.empty()); | 217 DCHECK(!raw_device_id.empty()); |
| 217 | 218 |
| 218 cb.Run(media::OUTPUT_DEVICE_STATUS_OK, should_send_id, | 219 cb.Run(media::OUTPUT_DEVICE_STATUS_OK, should_send_id, |
| 219 output_params.IsValid() ? output_params | 220 output_params.IsValid() ? output_params |
| 220 : TryToFixAudioParameters(output_params), | 221 : TryToFixAudioParameters(output_params), |
| 221 raw_device_id); | 222 raw_device_id); |
| 222 } | 223 } |
| 223 | 224 |
| 224 } // namespace content | 225 } // namespace content |
| OLD | NEW |