| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/system/chromeos/audio/audio_detailed_view.h" | 5 #include "ash/system/chromeos/audio/audio_detailed_view.h" |
| 6 | 6 |
| 7 #include "ash/system/tray/fixed_sized_scroll_view.h" | 7 #include "ash/system/tray/fixed_sized_scroll_view.h" |
| 8 #include "ash/system/tray/hover_highlight_view.h" | 8 #include "ash/system/tray/hover_highlight_view.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 scroller()->Layout(); | 160 scroller()->Layout(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void AudioDetailedView::OnViewClicked(views::View* sender) { | 163 void AudioDetailedView::OnViewClicked(views::View* sender) { |
| 164 if (sender == footer()->content()) { | 164 if (sender == footer()->content()) { |
| 165 TransitionToDefaultView(); | 165 TransitionToDefaultView(); |
| 166 } else { | 166 } else { |
| 167 AudioDeviceMap::iterator iter = device_map_.find(sender); | 167 AudioDeviceMap::iterator iter = device_map_.find(sender); |
| 168 if (iter == device_map_.end()) | 168 if (iter == device_map_.end()) |
| 169 return; | 169 return; |
| 170 chromeos::AudioDevice& device = iter->second; | 170 chromeos::AudioDevice device = iter->second; |
| 171 CrasAudioHandler::Get()->SwitchToDevice(device, true); | 171 CrasAudioHandler::Get()->SwitchToDevice(device, true, |
| 172 CrasAudioHandler::ACTIVATE_BY_USER); |
| 172 } | 173 } |
| 173 } | 174 } |
| 174 | 175 |
| 175 } // namespace tray | 176 } // namespace tray |
| 176 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |