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 #include "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_privat
e_api.h" | 5 #include "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_privat
e_api.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // empty string as the current device ID. | 205 // empty string as the current device ID. |
206 if (media::AudioDeviceDescription::IsDefaultDevice(raw_id)) | 206 if (media::AudioDeviceDescription::IsDefaultDevice(raw_id)) |
207 return media::AudioDeviceDescription::kDefaultDeviceId; | 207 return media::AudioDeviceDescription::kDefaultDeviceId; |
208 | 208 |
209 url::Origin security_origin(source_url().GetOrigin()); | 209 url::Origin security_origin(source_url().GetOrigin()); |
210 return content::GetHMACForMediaDeviceID(device_id_salt(), security_origin, | 210 return content::GetHMACForMediaDeviceID(device_id_salt(), security_origin, |
211 raw_id); | 211 raw_id); |
212 } | 212 } |
213 | 213 |
214 void WebrtcAudioPrivateFunction::InitDeviceIDSalt() { | 214 void WebrtcAudioPrivateFunction::InitDeviceIDSalt() { |
215 device_id_salt_ = GetProfile()->GetResourceContext()->GetMediaDeviceIDSalt(); | 215 device_id_salt_ = GetProfile()->GetMediaDeviceIDSalt(); |
216 } | 216 } |
217 | 217 |
218 std::string WebrtcAudioPrivateFunction::device_id_salt() const { | 218 std::string WebrtcAudioPrivateFunction::device_id_salt() const { |
219 return device_id_salt_; | 219 return device_id_salt_; |
220 } | 220 } |
221 | 221 |
222 // TODO(hlundin): Stolen from WebrtcLoggingPrivateFunction. | 222 // TODO(hlundin): Stolen from WebrtcLoggingPrivateFunction. |
223 // Consolidate and improve. http://crbug.com/710371 | 223 // Consolidate and improve. http://crbug.com/710371 |
224 content::RenderProcessHost* | 224 content::RenderProcessHost* |
225 WebrtcAudioPrivateFunction::GetRenderProcessHostFromRequest( | 225 WebrtcAudioPrivateFunction::GetRenderProcessHostFromRequest( |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 } | 564 } |
565 | 565 |
566 host->SetEchoCanceller3(*params->audio_experiments.enable_aec3); | 566 host->SetEchoCanceller3(*params->audio_experiments.enable_aec3); |
567 } | 567 } |
568 | 568 |
569 SendResponse(true); | 569 SendResponse(true); |
570 return true; | 570 return true; |
571 } | 571 } |
572 | 572 |
573 } // namespace extensions | 573 } // namespace extensions |
OLD | NEW |