| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/audio/audio_manager.h" | 5 #include "media/audio/audio_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } | 296 } |
| 297 #endif | 297 #endif |
| 298 } | 298 } |
| 299 | 299 |
| 300 // Forward declaration of the platform specific AudioManager factory function. | 300 // Forward declaration of the platform specific AudioManager factory function. |
| 301 ScopedAudioManagerPtr CreateAudioManager( | 301 ScopedAudioManagerPtr CreateAudioManager( |
| 302 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 302 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 303 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, | 303 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, |
| 304 AudioLogFactory* audio_log_factory); | 304 AudioLogFactory* audio_log_factory); |
| 305 | 305 |
| 306 void AudioManager::SetMaxStreamCountForTesting(int max_input, int max_output) { |
| 307 NOTREACHED(); |
| 308 } |
| 309 |
| 306 AudioManager::AudioManager( | 310 AudioManager::AudioManager( |
| 307 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 311 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 308 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner) | 312 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner) |
| 309 : task_runner_(std::move(task_runner)), | 313 : task_runner_(std::move(task_runner)), |
| 310 worker_task_runner_(std::move(worker_task_runner)) { | 314 worker_task_runner_(std::move(worker_task_runner)) { |
| 311 DCHECK(task_runner_); | 315 DCHECK(task_runner_); |
| 312 DCHECK(worker_task_runner_); | 316 DCHECK(worker_task_runner_); |
| 313 | 317 |
| 314 if (g_last_created) { | 318 if (g_last_created) { |
| 315 // We create multiple instances of AudioManager only when testing. | 319 // We create multiple instances of AudioManager only when testing. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return g_helper.Pointer()->app_name(); | 380 return g_helper.Pointer()->app_name(); |
| 377 } | 381 } |
| 378 #endif | 382 #endif |
| 379 | 383 |
| 380 // static | 384 // static |
| 381 AudioManager* AudioManager::Get() { | 385 AudioManager* AudioManager::Get() { |
| 382 return g_last_created; | 386 return g_last_created; |
| 383 } | 387 } |
| 384 | 388 |
| 385 } // namespace media | 389 } // namespace media |
| OLD | NEW |