summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/browser/api')
-rw-r--r--extensions/browser/api/audio/audio_apitest.cc18
-rw-r--r--extensions/browser/api/audio/audio_service_chromeos.cc4
2 files changed, 14 insertions, 8 deletions
diff --git a/extensions/browser/api/audio/audio_apitest.cc b/extensions/browser/api/audio/audio_apitest.cc
index d53bcd5..6d100059 100644
--- a/extensions/browser/api/audio/audio_apitest.cc
+++ b/extensions/browser/api/audio/audio_apitest.cc
@@ -25,15 +25,21 @@ using chromeos::AudioNode;
using chromeos::AudioNodeList;
const uint64_t kJabraSpeaker1Id = 30001;
+const uint64_t kJabraSpeaker1StableDeviceId = 80001;
const uint64_t kJabraSpeaker2Id = 30002;
+const uint64_t kJabraSpeaker2StableDeviceId = 80002;
const uint64_t kHDMIOutputId = 30003;
+const uint64_t kHDMIOutputStabeDevicelId = 80003;
const uint64_t kJabraMic1Id = 40001;
+const uint64_t kJabraMic1StableDeviceId = 90001;
const uint64_t kJabraMic2Id = 40002;
+const uint64_t kJabraMic2StableDeviceId = 90002;
const uint64_t kWebcamMicId = 40003;
+const uint64_t kWebcamMicStableDeviceId = 90003;
const AudioNode kJabraSpeaker1(false,
kJabraSpeaker1Id,
- kJabraSpeaker1Id,
+ kJabraSpeaker1StableDeviceId,
"Jabra Speaker",
"USB",
"Jabra Speaker 1",
@@ -42,7 +48,7 @@ const AudioNode kJabraSpeaker1(false,
const AudioNode kJabraSpeaker2(false,
kJabraSpeaker2Id,
- kJabraSpeaker2Id,
+ kJabraSpeaker2StableDeviceId,
"Jabra Speaker",
"USB",
"Jabra Speaker 2",
@@ -51,7 +57,7 @@ const AudioNode kJabraSpeaker2(false,
const AudioNode kHDMIOutput(false,
kHDMIOutputId,
- kHDMIOutputId,
+ kHDMIOutputStabeDevicelId,
"HDMI output",
"HDMI",
"HDA Intel MID",
@@ -60,7 +66,7 @@ const AudioNode kHDMIOutput(false,
const AudioNode kJabraMic1(true,
kJabraMic1Id,
- kJabraMic1Id,
+ kJabraMic1StableDeviceId,
"Jabra Mic",
"USB",
"Jabra Mic 1",
@@ -69,7 +75,7 @@ const AudioNode kJabraMic1(true,
const AudioNode kJabraMic2(true,
kJabraMic2Id,
- kJabraMic2Id,
+ kJabraMic2StableDeviceId,
"Jabra Mic",
"USB",
"Jabra Mic 2",
@@ -78,7 +84,7 @@ const AudioNode kJabraMic2(true,
const AudioNode kUSBCameraMic(true,
kWebcamMicId,
- kWebcamMicId,
+ kWebcamMicStableDeviceId,
"Webcam Mic",
"USB",
"Logitech Webcam",
diff --git a/extensions/browser/api/audio/audio_service_chromeos.cc b/extensions/browser/api/audio/audio_service_chromeos.cc
index abd3f85..6089b88 100644
--- a/extensions/browser/api/audio/audio_service_chromeos.cc
+++ b/extensions/browser/api/audio/audio_service_chromeos.cc
@@ -273,8 +273,8 @@ void AudioServiceImpl::NotifyDevicesChanged() {
? cras_audio_handler_->GetOutputVolumePercentForDevice(
devices[i].id)
: cras_audio_handler_->GetInputGainPercentForDevice(devices[i].id);
- // TODO(jennyz): Set stable_device_id once it is implemented.
- // See crbug.com/466768.
+ info->stable_device_id.reset(
+ new std::string(base::Uint64ToString(devices[i].stable_device_id)));
devices_info_list.push_back(info);
}