summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorjennyz <jennyz@chromium.org>2016-03-02 12:15:52 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-02 20:17:16 +0000
commitbd23674643e0993e443ef785e80b9ad2e3e9adf4 (patch)
treeceacaa531bf0eee1923686dcf5c6b74d5ecdee99 /ash
parent66a4306ee83b007997120be98638487a617938d8 (diff)
downloadchromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.zip
chromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.tar.gz
chromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.tar.bz2
Persist the user's active audio device choice across chromeos session and reboots.
This cl added a new attribute to device's active state settings to describe if the device is made active by user's selection or by automatic priority selection. The device made active by user has a higher priority than the device made active by priority. With the stable device id, the active device selection rule is different than before, which only select the active device by its priority. Please see the details in the following document. https://docs.google.com/a/google.com/document/d/1zmSeM956Njh_9ZdLqyld-NTOpJyXVIfzv8DvQ1Xcksw/edit?usp=sharing BUG=308143 TBR=stevenjb,rkc,derat Review URL: https://codereview.chromium.org/1746843002 Cr-Commit-Position: refs/heads/master@{#378812}
Diffstat (limited to 'ash')
-rw-r--r--ash/system/chromeos/audio/audio_detailed_view.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ash/system/chromeos/audio/audio_detailed_view.cc b/ash/system/chromeos/audio/audio_detailed_view.cc
index 2e76943..ec960ee 100644
--- a/ash/system/chromeos/audio/audio_detailed_view.cc
+++ b/ash/system/chromeos/audio/audio_detailed_view.cc
@@ -167,8 +167,9 @@ void AudioDetailedView::OnViewClicked(views::View* sender) {
AudioDeviceMap::iterator iter = device_map_.find(sender);
if (iter == device_map_.end())
return;
- chromeos::AudioDevice& device = iter->second;
- CrasAudioHandler::Get()->SwitchToDevice(device, true);
+ chromeos::AudioDevice device = iter->second;
+ CrasAudioHandler::Get()->SwitchToDevice(device, true,
+ CrasAudioHandler::ACTIVATE_BY_USER);
}
}