| 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/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 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 bool CrasAudioClientStubImpl::HasObserver(Observer* observer) { | 76 bool CrasAudioClientStubImpl::HasObserver(Observer* observer) { |
| 77 return observers_.HasObserver(observer); | 77 return observers_.HasObserver(observer); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void CrasAudioClientStubImpl::GetVolumeState( | 80 void CrasAudioClientStubImpl::GetVolumeState( |
| 81 const GetVolumeStateCallback& callback) { | 81 const GetVolumeStateCallback& callback) { |
| 82 callback.Run(volume_state_, true); | 82 callback.Run(volume_state_, true); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void CrasAudioClientStubImpl::GetNodes(const GetNodesCallback& callback) { | 85 void CrasAudioClientStubImpl::GetNodes(const GetNodesCallback& callback, |
| 86 const ErrorCallback& error_callback) { |
| 86 callback.Run(node_list_, true); | 87 callback.Run(node_list_, true); |
| 87 } | 88 } |
| 88 | 89 |
| 89 void CrasAudioClientStubImpl::SetOutputNodeVolume(uint64 node_id, | 90 void CrasAudioClientStubImpl::SetOutputNodeVolume(uint64 node_id, |
| 90 int32 volume) { | 91 int32 volume) { |
| 91 } | 92 } |
| 92 | 93 |
| 93 void CrasAudioClientStubImpl::SetOutputUserMute(bool mute_on) { | 94 void CrasAudioClientStubImpl::SetOutputUserMute(bool mute_on) { |
| 94 volume_state_.output_user_mute = mute_on; | 95 volume_state_.output_user_mute = mute_on; |
| 95 FOR_EACH_OBSERVER(Observer, | 96 FOR_EACH_OBSERVER(Observer, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 for (size_t i = 0; i < audio_nodes.size(); ++i) | 147 for (size_t i = 0; i < audio_nodes.size(); ++i) |
| 147 node_list_.push_back(audio_nodes[i]); | 148 node_list_.push_back(audio_nodes[i]); |
| 148 } | 149 } |
| 149 | 150 |
| 150 void CrasAudioClientStubImpl::ChangeAudioNodes(const AudioNodeList& new_nodes) { | 151 void CrasAudioClientStubImpl::ChangeAudioNodes(const AudioNodeList& new_nodes) { |
| 151 SetAudioDevices(new_nodes); | 152 SetAudioDevices(new_nodes); |
| 152 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); | 153 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); |
| 153 } | 154 } |
| 154 | 155 |
| 155 } // namespace chromeos | 156 } // namespace chromeos |
| OLD | NEW |