Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
index 202ca5b41ad063146e27fd46bfa3535c585138c1..c50ebdbf67d229dd6398d751b25396d696d35a04 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
@@ -89,6 +89,7 @@ |
#include "chrome/browser/upgrade_detector.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/url_constants.h" |
+#include "chromeos/audio/cras_audio_handler.h" |
#include "chromeos/chromeos_switches.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/session_manager_client.h" |
@@ -292,6 +293,8 @@ SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() |
this, |
chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, |
content::NotificationService::AllSources()); |
+ |
+ CrasAudioHandler::Get()->AddAudioObserver(this); |
} |
void SystemTrayDelegateChromeOS::Initialize() { |
@@ -369,6 +372,8 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() { |
// Stop observing Drive operations. |
UnobserveDriveUpdates(); |
+ CrasAudioHandler::Get()->RemoveAudioObserver(this); |
+ |
policy::BrowserPolicyConnectorChromeOS* connector = |
g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
policy::DeviceCloudPolicyManagerChromeOS* policy_manager = |
@@ -1202,6 +1207,33 @@ void SystemTrayDelegateChromeOS::InputMethodPropertyChanged( |
GetSystemTrayNotifier()->NotifyRefreshIME(false); |
} |
+// Overridden from CrasAudioHandler::AudioObserver. |
+void SystemTrayDelegateChromeOS::OnOutputVolumeChanged() { |
+ GetSystemTrayNotifier()->NotifyAudioOutputVolumeChanged(); |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnOutputMuteChanged() { |
+ GetSystemTrayNotifier()->NotifyAudioOutputMuteChanged(); |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnInputGainChanged() { |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnInputMuteChanged() { |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnAudioNodesChanged() { |
+ GetSystemTrayNotifier()->NotifyAudioNodesChanged(); |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnActiveOutputNodeChanged() { |
+ GetSystemTrayNotifier()->NotifyAudioActiveOutputNodeChanged(); |
+} |
+ |
+void SystemTrayDelegateChromeOS::OnActiveInputNodeChanged() { |
+ GetSystemTrayNotifier()->NotifyAudioActiveInputNodeChanged(); |
+} |
+ |
// drive::JobListObserver overrides. |
void SystemTrayDelegateChromeOS::OnJobAdded(const drive::JobInfo& job_info) { |
OnJobUpdated(job_info); |