Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: ash/system/chromeos/audio/audio_detailed_view.cc

Issue 1116643005: Do not display CRAS loopback devices on UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/audio/audio_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 void AudioDetailedView::UpdateAudioDevices() { 113 void AudioDetailedView::UpdateAudioDevices() {
114 output_devices_.clear(); 114 output_devices_.clear();
115 input_devices_.clear(); 115 input_devices_.clear();
116 chromeos::AudioDeviceList devices; 116 chromeos::AudioDeviceList devices;
117 CrasAudioHandler::Get()->GetAudioDevices(&devices); 117 CrasAudioHandler::Get()->GetAudioDevices(&devices);
118 for (size_t i = 0; i < devices.size(); ++i) { 118 for (size_t i = 0; i < devices.size(); ++i) {
119 // Don't display keyboard mic or aokr type. 119 // Don't display keyboard mic or aokr type.
120 if (devices[i].type == chromeos::AUDIO_TYPE_KEYBOARD_MIC || 120 if (devices[i].type == chromeos::AUDIO_TYPE_KEYBOARD_MIC ||
121 devices[i].type == chromeos::AUDIO_TYPE_AOKR) 121 devices[i].type == chromeos::AUDIO_TYPE_AOKR ||
122 devices[i].type == chromeos::AUDIO_TYPE_POST_MIX_LOOPBACK ||
123 devices[i].type == chromeos::AUDIO_TYPE_POST_DSP_LOOPBACK)
122 continue; 124 continue;
123 if (devices[i].is_input) 125 if (devices[i].is_input)
124 input_devices_.push_back(devices[i]); 126 input_devices_.push_back(devices[i]);
125 else 127 else
126 output_devices_.push_back(devices[i]); 128 output_devices_.push_back(devices[i]);
127 } 129 }
128 UpdateScrollableList(); 130 UpdateScrollableList();
129 } 131 }
130 132
131 void AudioDetailedView::UpdateScrollableList() { 133 void AudioDetailedView::UpdateScrollableList() {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 AudioDeviceMap::iterator iter = device_map_.find(sender); 167 AudioDeviceMap::iterator iter = device_map_.find(sender);
166 if (iter == device_map_.end()) 168 if (iter == device_map_.end())
167 return; 169 return;
168 chromeos::AudioDevice& device = iter->second; 170 chromeos::AudioDevice& device = iter->second;
169 CrasAudioHandler::Get()->SwitchToDevice(device, true); 171 CrasAudioHandler::Get()->SwitchToDevice(device, true);
170 } 172 }
171 } 173 }
172 174
173 } // namespace tray 175 } // namespace tray
174 } // namespace ash 176 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chromeos/audio/audio_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698