| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 std::vector<AudioDevice>, | 34 std::vector<AudioDevice>, |
| 35 AudioDeviceCompare> AudioDevicePriorityQueue; | 35 AudioDeviceCompare> AudioDevicePriorityQueue; |
| 36 typedef std::vector<uint64_t> NodeIdList; | 36 typedef std::vector<uint64_t> NodeIdList; |
| 37 | 37 |
| 38 class AudioObserver { | 38 class AudioObserver { |
| 39 public: | 39 public: |
| 40 // Called when an active output volume changed. | 40 // Called when an active output volume changed. |
| 41 virtual void OnOutputNodeVolumeChanged(uint64_t node_id, int volume); | 41 virtual void OnOutputNodeVolumeChanged(uint64_t node_id, int volume); |
| 42 | 42 |
| 43 // Called when output mute state changed. | 43 // Called when output mute state changed. |
| 44 virtual void OnOutputMuteChanged(bool mute_on); | 44 // |mute_on|: True if output is muted. |
| 45 // |system_adjust|: True if the mute state is adjusted by the system |
| 46 // automatically(i.e. not by user). UI should reflect the system's mute |
| 47 // state, but it should not be too loud, e.g., the volume pop up window |
| 48 // should not be triggered. |
| 49 virtual void OnOutputMuteChanged(bool mute_on, bool system_adjust); |
| 45 | 50 |
| 46 // Called when active input node's gain changed. | 51 // Called when active input node's gain changed. |
| 47 virtual void OnInputNodeGainChanged(uint64_t node_id, int gain); | 52 virtual void OnInputNodeGainChanged(uint64_t node_id, int gain); |
| 48 | 53 |
| 49 // Called when input mute state changed. | 54 // Called when input mute state changed. |
| 50 virtual void OnInputMuteChanged(bool mute_on); | 55 virtual void OnInputMuteChanged(bool mute_on); |
| 51 | 56 |
| 52 // Called when audio nodes changed. | 57 // Called when audio nodes changed. |
| 53 virtual void OnAudioNodesChanged(); | 58 virtual void OnAudioNodesChanged(); |
| 54 | 59 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 bool hdmi_rediscovering_; | 359 bool hdmi_rediscovering_; |
| 355 | 360 |
| 356 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 361 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
| 357 | 362 |
| 358 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 363 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
| 359 }; | 364 }; |
| 360 | 365 |
| 361 } // namespace chromeos | 366 } // namespace chromeos |
| 362 | 367 |
| 363 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 368 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| OLD | NEW |