OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h" | 5 #include "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h" |
6 | 6 |
7 #include "chromeos/audio/cras_audio_handler.h" | 7 #include "chromeos/audio/cras_audio_handler.h" |
8 #include "grit/ash_resources.h" | 8 #include "grit/ash_resources.h" |
9 | 9 |
10 using chromeos::CrasAudioHandler; | 10 using chromeos::CrasAudioHandler; |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace system { | 13 namespace system { |
14 | 14 |
15 void TrayAudioDelegateChromeOs::AdjustOutputVolumeToAudibleLevel() { | 15 void TrayAudioDelegateChromeOs::AdjustOutputVolumeToAudibleLevel() { |
16 CrasAudioHandler::Get()->AdjustOutputVolumeToAudibleLevel(); | 16 CrasAudioHandler::Get()->AdjustOutputVolumeToAudibleLevel(); |
17 } | 17 } |
18 | 18 |
19 int TrayAudioDelegateChromeOs::GetOutputDefaultVolumeMuteLevel() { | 19 int TrayAudioDelegateChromeOs::GetOutputDefaultVolumeMuteLevel() { |
20 return CrasAudioHandler::Get()->GetOutputDefaultVolumeMuteThreshold(); | 20 return CrasAudioHandler::Get()->GetOutputDefaultVolumeMuteThreshold(); |
21 } | 21 } |
22 | 22 |
(...skipping 11 matching lines...) Expand all Loading... |
34 else if (device.type == chromeos::AUDIO_TYPE_USB) | 34 else if (device.type == chromeos::AUDIO_TYPE_USB) |
35 return IDR_AURA_UBER_TRAY_AUDIO_USB; | 35 return IDR_AURA_UBER_TRAY_AUDIO_USB; |
36 else if (device.type == chromeos::AUDIO_TYPE_BLUETOOTH) | 36 else if (device.type == chromeos::AUDIO_TYPE_BLUETOOTH) |
37 return IDR_AURA_UBER_TRAY_AUDIO_BLUETOOTH; | 37 return IDR_AURA_UBER_TRAY_AUDIO_BLUETOOTH; |
38 else if (device.type == chromeos::AUDIO_TYPE_HDMI) | 38 else if (device.type == chromeos::AUDIO_TYPE_HDMI) |
39 return IDR_AURA_UBER_TRAY_AUDIO_HDMI; | 39 return IDR_AURA_UBER_TRAY_AUDIO_HDMI; |
40 else | 40 else |
41 return kNoAudioDeviceIcon; | 41 return kNoAudioDeviceIcon; |
42 } | 42 } |
43 | 43 |
44 | |
45 bool TrayAudioDelegateChromeOs::HasAlternativeSources() { | 44 bool TrayAudioDelegateChromeOs::HasAlternativeSources() { |
46 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); | 45 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); |
47 return (audio_handler->has_alternative_output() || | 46 return (audio_handler->has_alternative_output() || |
48 audio_handler->has_alternative_input()); | 47 audio_handler->has_alternative_input()); |
49 } | 48 } |
50 | 49 |
51 bool TrayAudioDelegateChromeOs::IsOutputAudioMuted() { | 50 bool TrayAudioDelegateChromeOs::IsOutputAudioMuted() { |
52 return CrasAudioHandler::Get()->IsOutputMuted(); | 51 return CrasAudioHandler::Get()->IsOutputMuted(); |
53 } | 52 } |
54 | 53 |
(...skipping 12 matching lines...) Expand all Loading... |
67 } | 66 } |
68 | 67 |
69 void TrayAudioDelegateChromeOs::SetActiveHDMIOutoutRediscoveringIfNecessary( | 68 void TrayAudioDelegateChromeOs::SetActiveHDMIOutoutRediscoveringIfNecessary( |
70 bool force_rediscovering) { | 69 bool force_rediscovering) { |
71 CrasAudioHandler::Get()->SetActiveHDMIOutoutRediscoveringIfNecessary( | 70 CrasAudioHandler::Get()->SetActiveHDMIOutoutRediscoveringIfNecessary( |
72 force_rediscovering); | 71 force_rediscovering); |
73 } | 72 } |
74 | 73 |
75 } // namespace system | 74 } // namespace system |
76 } // namespace ash | 75 } // namespace ash |
OLD | NEW |