Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ | |
| 6 #define COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chromeos/audio/cras_audio_handler.h" | |
| 12 #include "components/arc/arc_bridge_service.h" | |
| 13 #include "components/arc/arc_service.h" | |
| 14 #include "mojo/public/cpp/bindings/binding.h" | |
| 15 | |
| 16 namespace arc { | |
| 17 | |
| 18 class ArcAudioBridge : public ArcService, | |
| 19 public ArcBridgeService::Observer, | |
| 20 public AudioHost, | |
| 21 public chromeos::CrasAudioHandler::AudioObserver { | |
| 22 public: | |
| 23 explicit ArcAudioBridge(ArcBridgeService* bridge_service); | |
| 24 ~ArcAudioBridge() override; | |
| 25 | |
| 26 // ArcBridgeService::Observer overrides. | |
| 27 void OnAudioInstanceReady() override; | |
| 28 | |
| 29 private: | |
| 30 mojo::Binding<AudioHost> binding_; | |
| 31 chromeos::CrasAudioHandler* cras_audio_handler_; | |
|
jennyz
2016/03/23 23:50:42
InitializeL cras_audio_handler_ = nullptr;
chinyue
2016/03/25 09:50:31
Done.
| |
| 32 | |
| 33 // chromeos::CrasAudioHandler::AudioObserver overrides. | |
| 34 void OnAudioNodesChanged() override; | |
| 35 | |
| 36 void SendSwitchState(bool headphone_inserted, bool microphone_inserted); | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(ArcAudioBridge); | |
| 39 }; | |
| 40 | |
| 41 } // namespace arc | |
| 42 | |
| 43 #endif // COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ | |
| OLD | NEW |