| 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/tray/wm_system_tray_notifier.h" | 7 #include "ash/common/system/tray/system_tray_notifier.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chromeos/audio/audio_device.h" | 10 #include "chromeos/audio/audio_device.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()->AddObserver(this); | 16 arc_bridge_service()->AddObserver(this); |
| 17 if (chromeos::CrasAudioHandler::IsInitialized()) { | 17 if (chromeos::CrasAudioHandler::IsInitialized()) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_MICROPHONE_INSERT)); | 80 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_MICROPHONE_INSERT)); |
| 81 } | 81 } |
| 82 | 82 |
| 83 VLOG(1) << "Send switch state " << switch_state; | 83 VLOG(1) << "Send switch state " << switch_state; |
| 84 mojom::AudioInstance* audio_instance = arc_bridge_service()->audio_instance(); | 84 mojom::AudioInstance* audio_instance = arc_bridge_service()->audio_instance(); |
| 85 if (audio_instance) | 85 if (audio_instance) |
| 86 audio_instance->NotifySwitchState(switch_state); | 86 audio_instance->NotifySwitchState(switch_state); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace arc | 89 } // namespace arc |
| OLD | NEW |