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

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

Issue 2813113002: Adding ArcBridge Interface for Volume Update Requests (Closed)
Patch Set: Adding ArcBridge Interface for Volume Update Requests Created 3 years, 6 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
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 #ifndef COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_
6 #define COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ 6 #define COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 public chromeos::CrasAudioHandler::AudioObserver { 24 public chromeos::CrasAudioHandler::AudioObserver {
25 public: 25 public:
26 explicit ArcAudioBridge(ArcBridgeService* bridge_service); 26 explicit ArcAudioBridge(ArcBridgeService* bridge_service);
27 ~ArcAudioBridge() override; 27 ~ArcAudioBridge() override;
28 28
29 // InstanceHolder<mojom::AudioInstance>::Observer overrides. 29 // InstanceHolder<mojom::AudioInstance>::Observer overrides.
30 void OnInstanceReady() override; 30 void OnInstanceReady() override;
31 31
32 // mojom::AudioHost overrides. 32 // mojom::AudioHost overrides.
33 void ShowVolumeControls() override; 33 void ShowVolumeControls() override;
34 void OnSystemVolumeUpdateRequest(int32_t volume) override;
Luis Héctor Chávez 2017/06/06 17:57:26 nit: s/volume/percent/
34 35
35 private: 36 private:
36 mojo::Binding<mojom::AudioHost> binding_; 37 mojo::Binding<mojom::AudioHost> binding_;
37 38
38 chromeos::CrasAudioHandler* cras_audio_handler_ = nullptr; 39 chromeos::CrasAudioHandler* cras_audio_handler_ = nullptr;
39 40
40 int volume_ = 0; // Volume range: 0-100. 41 int volume_ = 0; // Volume range: 0-100.
41 bool muted_ = false; 42 bool muted_ = false;
42 43
43 // chromeos::CrasAudioHandler::AudioObserver overrides. 44 // chromeos::CrasAudioHandler::AudioObserver overrides.
44 void OnAudioNodesChanged() override; 45 void OnAudioNodesChanged() override;
45 void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override; 46 void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override;
46 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override; 47 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override;
47 48
48 void SendSwitchState(bool headphone_inserted, bool microphone_inserted); 49 void SendSwitchState(bool headphone_inserted, bool microphone_inserted);
49 void SendVolumeState(); 50 void SendVolumeState();
50 51
51 DISALLOW_COPY_AND_ASSIGN(ArcAudioBridge); 52 DISALLOW_COPY_AND_ASSIGN(ArcAudioBridge);
52 }; 53 };
53 54
54 } // namespace arc 55 } // namespace arc
55 56
56 #endif // COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_ 57 #endif // COMPONENTS_ARC_AUDIO_ARC_AUDIO_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | components/arc/audio/arc_audio_bridge.cc » ('j') | components/arc/audio/arc_audio_bridge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698