| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/arc/audio/arc_audio_bridge.h" | 5 #include "components/arc/audio/arc_audio_bridge.h" |
| 6 | 6 |
| 7 #include "ash/common/system/chromeos/audio/tray_audio.h" | 7 #include "ash/system/audio/tray_audio.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chromeos/audio/audio_device.h" | 9 #include "chromeos/audio/audio_device.h" |
| 10 #include "components/arc/arc_bridge_service.h" | 10 #include "components/arc/arc_bridge_service.h" |
| 11 | 11 |
| 12 namespace arc { | 12 namespace arc { |
| 13 | 13 |
| 14 ArcAudioBridge::ArcAudioBridge(ArcBridgeService* bridge_service) | 14 ArcAudioBridge::ArcAudioBridge(ArcBridgeService* bridge_service) |
| 15 : ArcService(bridge_service), binding_(this) { | 15 : ArcService(bridge_service), binding_(this) { |
| 16 arc_bridge_service()->audio()->AddObserver(this); | 16 arc_bridge_service()->audio()->AddObserver(this); |
| 17 if (chromeos::CrasAudioHandler::IsInitialized()) { | 17 if (chromeos::CrasAudioHandler::IsInitialized()) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 void ArcAudioBridge::SendVolumeState() { | 93 void ArcAudioBridge::SendVolumeState() { |
| 94 DVLOG(1) << "Send volume " << volume_ << " muted " << muted_; | 94 DVLOG(1) << "Send volume " << volume_ << " muted " << muted_; |
| 95 mojom::AudioInstance* audio_instance = ARC_GET_INSTANCE_FOR_METHOD( | 95 mojom::AudioInstance* audio_instance = ARC_GET_INSTANCE_FOR_METHOD( |
| 96 arc_bridge_service()->audio(), NotifyVolumeState); | 96 arc_bridge_service()->audio(), NotifyVolumeState); |
| 97 if (audio_instance) | 97 if (audio_instance) |
| 98 audio_instance->NotifyVolumeState(volume_, muted_); | 98 audio_instance->NotifyVolumeState(volume_, muted_); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace arc | 101 } // namespace arc |
| OLD | NEW |