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

Unified Diff: ash/system/tray/system_tray_notifier.cc

Issue 165393013: Resubmit 'Refactor the TrayAudio code so that it can be used by other platforms.' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_notifier.cc
diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc
index 95b6789e87d75d0fe91ee6cddbf5e2ec33123a18..6a2cc79d79090b172bdb754ae2da70b210189207 100644
--- a/ash/system/tray/system_tray_notifier.cc
+++ b/ash/system/tray/system_tray_notifier.cc
@@ -29,6 +29,14 @@ void SystemTrayNotifier::RemoveAccessibilityObserver(
accessibility_observers_.RemoveObserver(observer);
}
+void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) {
+ audio_observers_.AddObserver(observer);
+}
+
+void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) {
+ audio_observers_.RemoveObserver(observer);
+}
+
void SystemTrayNotifier::AddBluetoothObserver(BluetoothObserver* observer) {
bluetooth_observers_.AddObserver(observer);
}
@@ -170,6 +178,41 @@ void SystemTrayNotifier::NotifyAccessibilityModeChanged(
OnAccessibilityModeChanged(notify));
}
+void SystemTrayNotifier::NotifyAudioOutputVolumeChanged() {
+ FOR_EACH_OBSERVER(
+ AudioObserver,
+ audio_observers_,
+ OnOutputVolumeChanged());
+}
+
+void SystemTrayNotifier::NotifyAudioOutputMuteChanged() {
+ FOR_EACH_OBSERVER(
+ AudioObserver,
+ audio_observers_,
+ OnOutputMuteChanged());
+}
+
+void SystemTrayNotifier::NotifyAudioNodesChanged() {
+ FOR_EACH_OBSERVER(
+ AudioObserver,
+ audio_observers_,
+ OnAudioNodesChanged());
+}
+
+void SystemTrayNotifier::NotifyAudioActiveOutputNodeChanged() {
+ FOR_EACH_OBSERVER(
+ AudioObserver,
+ audio_observers_,
+ OnActiveOutputNodeChanged());
+}
+
+void SystemTrayNotifier::NotifyAudioActiveInputNodeChanged() {
+ FOR_EACH_OBSERVER(
+ AudioObserver,
+ audio_observers_,
+ OnActiveInputNodeChanged());
+}
+
void SystemTrayNotifier::NotifyTracingModeChanged(bool value) {
FOR_EACH_OBSERVER(
TracingObserver,
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698