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

Unified Diff: ash/common/system/tray/wm_system_tray_notifier.cc

Issue 2084533008: mash: Migrate tray audio and deps to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/wm_system_tray_notifier.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/wm_system_tray_notifier.cc
diff --git a/ash/common/system/tray/wm_system_tray_notifier.cc b/ash/common/system/tray/wm_system_tray_notifier.cc
index 2e18d634c7a26755bb366e0cc068ca6b7ebb3051..c790656a490c7def795ca6435db063b3db8f2203 100644
--- a/ash/common/system/tray/wm_system_tray_notifier.cc
+++ b/ash/common/system/tray/wm_system_tray_notifier.cc
@@ -5,6 +5,7 @@
#include "ash/common/system/tray/wm_system_tray_notifier.h"
#include "ash/common/system/accessibility_observer.h"
+#include "ash/common/system/audio/audio_observer.h"
#include "ash/common/system/date/clock_observer.h"
#include "ash/common/system/ime/ime_observer.h"
#include "ash/common/system/update/update_observer.h"
@@ -35,6 +36,40 @@ void WmSystemTrayNotifier::NotifyAccessibilityModeChanged(
OnAccessibilityModeChanged(notify));
}
+void WmSystemTrayNotifier::AddAudioObserver(AudioObserver* observer) {
+ audio_observers_.AddObserver(observer);
+}
+
+void WmSystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) {
+ audio_observers_.RemoveObserver(observer);
+}
+
+void WmSystemTrayNotifier::NotifyAudioOutputVolumeChanged(uint64_t node_id,
+ double volume) {
+ FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
+ OnOutputNodeVolumeChanged(node_id, volume));
+}
+
+void WmSystemTrayNotifier::NotifyAudioOutputMuteChanged(bool mute_on,
+ bool system_adjust) {
+ FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
+ OnOutputMuteChanged(mute_on, system_adjust));
+}
+
+void WmSystemTrayNotifier::NotifyAudioNodesChanged() {
+ FOR_EACH_OBSERVER(AudioObserver, audio_observers_, OnAudioNodesChanged());
+}
+
+void WmSystemTrayNotifier::NotifyAudioActiveOutputNodeChanged() {
+ FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
+ OnActiveOutputNodeChanged());
+}
+
+void WmSystemTrayNotifier::NotifyAudioActiveInputNodeChanged() {
+ FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
+ OnActiveInputNodeChanged());
+}
+
void WmSystemTrayNotifier::AddClockObserver(ClockObserver* observer) {
clock_observers_.AddObserver(observer);
}
« no previous file with comments | « ash/common/system/tray/wm_system_tray_notifier.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698