OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_input_device_manager.h" | 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/renderer_host/media/audio_input_device_manager_event_h
andler.h" | 9 #include "content/browser/renderer_host/media/audio_input_device_manager_event_h
andler.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "media/audio/audio_manager.h" | 11 #include "media/audio/audio_manager.h" |
12 | 12 |
| 13 using content::BrowserThread; |
| 14 |
13 namespace media_stream { | 15 namespace media_stream { |
14 | 16 |
15 const int AudioInputDeviceManager::kFakeOpenSessionId = 1; | 17 const int AudioInputDeviceManager::kFakeOpenSessionId = 1; |
16 const int AudioInputDeviceManager::kInvalidSessionId = 0; | 18 const int AudioInputDeviceManager::kInvalidSessionId = 0; |
17 const int AudioInputDeviceManager::kInvalidDevice = -1; | 19 const int AudioInputDeviceManager::kInvalidDevice = -1; |
18 const int AudioInputDeviceManager::kDefaultDeviceIndex = 0; | 20 const int AudioInputDeviceManager::kDefaultDeviceIndex = 0; |
19 | 21 |
20 // Starting id for the first capture session. | 22 // Starting id for the first capture session. |
21 const int kFirstSessionId = AudioInputDeviceManager::kFakeOpenSessionId + 1; | 23 const int kFirstSessionId = AudioInputDeviceManager::kFakeOpenSessionId + 1; |
22 | 24 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 bool AudioInputDeviceManager::HasEventHandler(int session_id) { | 316 bool AudioInputDeviceManager::HasEventHandler(int session_id) { |
315 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 317 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
316 return event_handlers_.find(session_id) != event_handlers_.end(); | 318 return event_handlers_.find(session_id) != event_handlers_.end(); |
317 } | 319 } |
318 | 320 |
319 MessageLoop* AudioInputDeviceManager::message_loop() { | 321 MessageLoop* AudioInputDeviceManager::message_loop() { |
320 return audio_input_device_thread_.message_loop(); | 322 return audio_input_device_thread_.message_loop(); |
321 } | 323 } |
322 | 324 |
323 } // namespace media_stream | 325 } // namespace media_stream |
OLD | NEW |