| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/system_monitor/system_monitor.h" | 9 #include "base/system_monitor/system_monitor.h" |
| 10 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 10 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // device thread. | 147 // device thread. |
| 148 | 148 |
| 149 // Fills in |source_devices_|. OnGetDevicesDone will be invoked on | 149 // Fills in |source_devices_|. OnGetDevicesDone will be invoked on |
| 150 // the UI thread once done. | 150 // the UI thread once done. |
| 151 void GetDevicesOnDeviceThread(); | 151 void GetDevicesOnDeviceThread(); |
| 152 void OnGetDevicesDone(); | 152 void OnGetDevicesDone(); |
| 153 | 153 |
| 154 // Takes the parameters of the function, returns the raw source | 154 // Takes the parameters of the function, returns the raw source |
| 155 // device ID, or the empty string if none. | 155 // device ID, or the empty string if none. |
| 156 std::string GetRawSourceIDOnIOThread(GURL security_origin, | 156 std::string GetRawSourceIDOnIOThread(GURL security_origin, |
| 157 content::ResourceContext* context, |
| 157 const std::string& source_id_in_origin); | 158 const std::string& source_id_in_origin); |
| 158 void OnGetRawSourceIDDone(const std::string& raw_source_id); | 159 void OnGetRawSourceIDDone(const std::string& raw_source_id); |
| 159 | 160 |
| 160 // Given a raw source ID, get its associated sink, which needs to | 161 // Given a raw source ID, get its associated sink, which needs to |
| 161 // happen on the device thread. | 162 // happen on the device thread. |
| 162 std::string GetAssociatedSinkOnDeviceThread(const std::string& raw_source_id); | 163 std::string GetAssociatedSinkOnDeviceThread(const std::string& raw_source_id); |
| 163 void OnGetAssociatedSinkDone(const std::string& associated_sink_id); | 164 void OnGetAssociatedSinkDone(const std::string& associated_sink_id); |
| 164 | 165 |
| 165 // Accessed from UI thread and device thread, but only on one at a | 166 // Accessed from UI thread and device thread, but only on one at a |
| 166 // time, no locking needed. | 167 // time, no locking needed. |
| 167 scoped_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; | 168 scoped_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; |
| 168 | 169 |
| 169 // Filled in by DoWorkOnDeviceThread. | 170 // Filled in by DoWorkOnDeviceThread. |
| 170 media::AudioDeviceNames source_devices_; | 171 media::AudioDeviceNames source_devices_; |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 } // namespace extensions | 174 } // namespace extensions |
| 174 | 175 |
| 175 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ | 176 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ |
| OLD | NEW |