Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: components/arc/audio/arc_audio_bridge.h

Issue 1817093003: Host-side implementation of ARC audio bridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed AudioHost interface, added Extensible to AudioSwitch enum, etc. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 chromeos::CrasAudioHandler::AudioObserver {
21 public:
22 explicit ArcAudioBridge(ArcBridgeService* bridge_service);
23 ~ArcAudioBridge() override;
24
25 // ArcBridgeService::Observer overrides.
26 void OnAudioInstanceReady() override;
27
28 private:
29 chromeos::CrasAudioHandler* cras_audio_handler_ = nullptr;
30
31 // chromeos::CrasAudioHandler::AudioObserver overrides.
32 void OnAudioNodesChanged() override;
33
34 void SendSwitchState(bool headphone_inserted, bool microphone_inserted);
35
36 DISALLOW_COPY_AND_ASSIGN(ArcAudioBridge);
37 };
38
39 } // namespace arc
40
41 #endif // COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698