| 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 // AudioInputDeviceManager manages the audio input devices. In particular it | 5 // AudioInputDeviceManager manages the audio input devices. In particular it |
| 6 // communicates with MediaStreamManager and AudioInputRendererHost on the | 6 // communicates with MediaStreamManager and AudioInputRendererHost on the |
| 7 // browser IO thread, handles queries like | 7 // browser IO thread, handles queries like |
| 8 // enumerate/open/close/GetOpenedDeviceInfoById from MediaStreamManager and | 8 // enumerate/open/close/GetOpenedDeviceInfoById from MediaStreamManager and |
| 9 // GetOpenedDeviceInfoById from AudioInputRendererHost. | 9 // GetOpenedDeviceInfoById from AudioInputRendererHost. |
| 10 // The work for enumerate/open/close is handled asynchronously on Media Stream | 10 // The work for enumerate/open/close is handled asynchronously on Media Stream |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Helper to return iterator to the device referenced by |session_id|. If no | 86 // Helper to return iterator to the device referenced by |session_id|. If no |
| 87 // device is found, it will return devices_.end(). | 87 // device is found, it will return devices_.end(). |
| 88 StreamDeviceList::iterator GetDevice(int session_id); | 88 StreamDeviceList::iterator GetDevice(int session_id); |
| 89 | 89 |
| 90 // Only accessed on Browser::IO thread. | 90 // Only accessed on Browser::IO thread. |
| 91 MediaStreamProviderListener* listener_; | 91 MediaStreamProviderListener* listener_; |
| 92 int next_capture_session_id_; | 92 int next_capture_session_id_; |
| 93 bool use_fake_device_; | 93 bool use_fake_device_; |
| 94 StreamDeviceList devices_; | 94 StreamDeviceList devices_; |
| 95 | 95 |
| 96 #if defined(OS_CHROMEOS) |
| 97 // Flag that's set when we have checked if the system has a keyboard mic. We |
| 98 // only need to check it once, and not when constructing since that will |
| 99 // affect startup time. |
| 100 // Must be accessed on the IO thread; |
| 101 bool has_checked_keyboard_mic_; |
| 102 #endif |
| 103 |
| 96 media::AudioManager* const audio_manager_; // Weak. | 104 media::AudioManager* const audio_manager_; // Weak. |
| 97 | 105 |
| 98 // The message loop of media stream device thread that this object runs on. | 106 // The message loop of media stream device thread that this object runs on. |
| 99 scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_; | 107 scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_; |
| 100 | 108 |
| 101 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); | 109 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); |
| 102 }; | 110 }; |
| 103 | 111 |
| 104 } // namespace content | 112 } // namespace content |
| 105 | 113 |
| 106 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ | 114 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ |
| OLD | NEW |