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 "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/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/common/media_stream_request.h" | 10 #include "content/public/common/media_stream_request.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace { | 21 namespace { |
22 // Starting id for the first capture session. | 22 // Starting id for the first capture session. |
23 const int kFirstSessionId = AudioInputDeviceManager::kFakeOpenSessionId + 1; | 23 const int kFirstSessionId = AudioInputDeviceManager::kFakeOpenSessionId + 1; |
24 } | 24 } |
25 | 25 |
26 AudioInputDeviceManager::AudioInputDeviceManager( | 26 AudioInputDeviceManager::AudioInputDeviceManager( |
27 media::AudioManager* audio_manager) | 27 media::AudioManager* audio_manager) |
28 : listener_(NULL), | 28 : listener_(NULL), |
29 next_capture_session_id_(kFirstSessionId), | 29 next_capture_session_id_(kFirstSessionId), |
30 use_fake_device_(false), | 30 use_fake_device_(false), |
| 31 #if defined(OS_CHROMEOS) |
| 32 has_checked_keyboard_mic_(false), |
| 33 #endif |
31 audio_manager_(audio_manager) { | 34 audio_manager_(audio_manager) { |
32 } | 35 } |
33 | 36 |
34 AudioInputDeviceManager::~AudioInputDeviceManager() { | 37 AudioInputDeviceManager::~AudioInputDeviceManager() { |
35 } | 38 } |
36 | 39 |
37 const StreamDeviceInfo* AudioInputDeviceManager::GetOpenedDeviceInfoById( | 40 const StreamDeviceInfo* AudioInputDeviceManager::GetOpenedDeviceInfoById( |
38 int session_id) { | 41 int session_id) { |
39 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 42 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
40 StreamDeviceList::iterator device = GetDevice(session_id); | 43 StreamDeviceList::iterator device = GetDevice(session_id); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 static const char kFakeDeviceId2[] = "fake_audio_2"; | 247 static const char kFakeDeviceId2[] = "fake_audio_2"; |
245 DCHECK(device_names->empty()); | 248 DCHECK(device_names->empty()); |
246 DCHECK(use_fake_device_); | 249 DCHECK(use_fake_device_); |
247 device_names->push_back(media::AudioDeviceName(kFakeDeviceName1, | 250 device_names->push_back(media::AudioDeviceName(kFakeDeviceName1, |
248 kFakeDeviceId1)); | 251 kFakeDeviceId1)); |
249 device_names->push_back(media::AudioDeviceName(kFakeDeviceName2, | 252 device_names->push_back(media::AudioDeviceName(kFakeDeviceName2, |
250 kFakeDeviceId2)); | 253 kFakeDeviceId2)); |
251 } | 254 } |
252 | 255 |
253 } // namespace content | 256 } // namespace content |
OLD | NEW |