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

Side by Side Diff: chromeos/dbus/cras_audio_client_stub_impl.cc

Issue 620673002: Flip the left/right speaker when the device is in yoga mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change internal speaker channel mode OnDisplayAdded. Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chromeos/dbus/cras_audio_client_stub_impl.h" 5 #include "chromeos/dbus/cras_audio_client_stub_impl.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 8
9 CrasAudioClientStubImpl::CrasAudioClientStubImpl() 9 CrasAudioClientStubImpl::CrasAudioClientStubImpl()
10 : active_input_node_id_(0), 10 : active_input_node_id_(0),
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 } 144 }
145 145
146 void CrasAudioClientStubImpl::RemoveActiveInputNode(uint64 node_id) { 146 void CrasAudioClientStubImpl::RemoveActiveInputNode(uint64 node_id) {
147 for (size_t i = 0; i < node_list_.size(); ++i) { 147 for (size_t i = 0; i < node_list_.size(); ++i) {
148 if (node_list_[i].id == node_id) 148 if (node_list_[i].id == node_id)
149 node_list_[i].active = false; 149 node_list_[i].active = false;
150 } 150 }
151 } 151 }
152 152
153 void CrasAudioClientStubImpl::SwapLeftRight(uint64 node_id, bool swap) {
154 }
155
153 void CrasAudioClientStubImpl::AddActiveOutputNode(uint64 node_id) { 156 void CrasAudioClientStubImpl::AddActiveOutputNode(uint64 node_id) {
154 for (size_t i = 0; i < node_list_.size(); ++i) { 157 for (size_t i = 0; i < node_list_.size(); ++i) {
155 if (node_list_[i].id == node_id) 158 if (node_list_[i].id == node_id)
156 node_list_[i].active = true; 159 node_list_[i].active = true;
157 } 160 }
158 } 161 }
159 162
160 void CrasAudioClientStubImpl::RemoveActiveOutputNode(uint64 node_id) { 163 void CrasAudioClientStubImpl::RemoveActiveOutputNode(uint64 node_id) {
161 for (size_t i = 0; i < node_list_.size(); ++i) { 164 for (size_t i = 0; i < node_list_.size(); ++i) {
162 if (node_list_[i].id == node_id) 165 if (node_list_[i].id == node_id)
163 node_list_[i].active = false; 166 node_list_[i].active = false;
164 } 167 }
165 } 168 }
166 169
167 void CrasAudioClientStubImpl::SetAudioNodesForTesting( 170 void CrasAudioClientStubImpl::SetAudioNodesForTesting(
168 const AudioNodeList& audio_nodes) { 171 const AudioNodeList& audio_nodes) {
169 node_list_ = audio_nodes; 172 node_list_ = audio_nodes;
170 } 173 }
171 174
172 void CrasAudioClientStubImpl::SetAudioNodesAndNotifyObserversForTesting( 175 void CrasAudioClientStubImpl::SetAudioNodesAndNotifyObserversForTesting(
173 const AudioNodeList& new_nodes) { 176 const AudioNodeList& new_nodes) {
174 SetAudioNodesForTesting(new_nodes); 177 SetAudioNodesForTesting(new_nodes);
175 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); 178 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged());
176 } 179 }
177 180
178 } // namespace chromeos 181 } // namespace chromeos
OLDNEW
« ash/system/audio/tray_audio.cc ('K') | « chromeos/dbus/cras_audio_client_stub_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698