| OLD | NEW | 
|---|
| 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/fake_cras_audio_client.h" | 5 #include "chromeos/dbus/fake_cras_audio_client.h" | 
| 6 | 6 | 
| 7 namespace chromeos { | 7 namespace chromeos { | 
| 8 | 8 | 
| 9 FakeCrasAudioClient::FakeCrasAudioClient() | 9 FakeCrasAudioClient::FakeCrasAudioClient() | 
| 10     : active_input_node_id_(0), | 10     : active_input_node_id_(0), | 
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 220   FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); | 220   FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); | 
| 221 } | 221 } | 
| 222 | 222 | 
| 223 void FakeCrasAudioClient::NotifyOutputNodeVolumeChangedForTesting( | 223 void FakeCrasAudioClient::NotifyOutputNodeVolumeChangedForTesting( | 
| 224     uint64_t node_id, | 224     uint64_t node_id, | 
| 225     int volume) { | 225     int volume) { | 
| 226   FOR_EACH_OBSERVER(Observer, observers_, | 226   FOR_EACH_OBSERVER(Observer, observers_, | 
| 227                     OutputNodeVolumeChanged(node_id, volume)); | 227                     OutputNodeVolumeChanged(node_id, volume)); | 
| 228 } | 228 } | 
| 229 | 229 | 
|  | 230 void FakeCrasAudioClient::NotifyAudioClientRestartedForTesting( | 
|  | 231     const AudioNodeList& new_nodes) { | 
|  | 232   SetAudioNodesForTesting(new_nodes); | 
|  | 233   FOR_EACH_OBSERVER(Observer, observers_, AudioClientRestarted()); | 
|  | 234 } | 
|  | 235 | 
| 230 AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) { | 236 AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) { | 
| 231   return std::find_if( | 237   return std::find_if( | 
| 232       node_list_.begin(), node_list_.end(), | 238       node_list_.begin(), node_list_.end(), | 
| 233       [node_id](const AudioNode& node) { return node_id == node.id; }); | 239       [node_id](const AudioNode& node) { return node_id == node.id; }); | 
| 234 } | 240 } | 
| 235 | 241 | 
| 236 }  // namespace chromeos | 242 }  // namespace chromeos | 
| OLD | NEW | 
|---|