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

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

Issue 2483393002: chromeos: Combine TrayAudio and TrayAudioChromeOs classes (Closed)
Patch Set: rebase Created 4 years, 1 month 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/system_tray_notifier.h ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_notifier.cc
diff --git a/ash/common/system/tray/system_tray_notifier.cc b/ash/common/system/tray/system_tray_notifier.cc
index 62b79b48b3335c2b094479804574cc38b6073883..0c9ee2877d959b330b5aad8960fd27a1e21d5483 100644
--- a/ash/common/system/tray/system_tray_notifier.cc
+++ b/ash/common/system/tray/system_tray_notifier.cc
@@ -5,13 +5,13 @@
#include "ash/common/system/tray/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"
#include "ash/common/system/user/user_observer.h"
#if defined(OS_CHROMEOS)
+#include "ash/common/system/chromeos/audio/audio_observer.h"
#include "ash/common/system/chromeos/bluetooth/bluetooth_observer.h"
#include "ash/common/system/chromeos/enterprise/enterprise_domain_observer.h"
#include "ash/common/system/chromeos/media_security/media_capture_observer.h"
@@ -48,41 +48,6 @@ void SystemTrayNotifier::NotifyAccessibilityModeChanged(
observer.OnAccessibilityModeChanged(notify);
}
-void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) {
- audio_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) {
- audio_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::NotifyAudioOutputVolumeChanged(uint64_t node_id,
- double volume) {
- for (auto& observer : audio_observers_)
- observer.OnOutputNodeVolumeChanged(node_id, volume);
-}
-
-void SystemTrayNotifier::NotifyAudioOutputMuteChanged(bool mute_on,
- bool system_adjust) {
- for (auto& observer : audio_observers_)
- observer.OnOutputMuteChanged(mute_on, system_adjust);
-}
-
-void SystemTrayNotifier::NotifyAudioNodesChanged() {
- for (auto& observer : audio_observers_)
- observer.OnAudioNodesChanged();
-}
-
-void SystemTrayNotifier::NotifyAudioActiveOutputNodeChanged() {
- for (auto& observer : audio_observers_)
- observer.OnActiveOutputNodeChanged();
-}
-
-void SystemTrayNotifier::NotifyAudioActiveInputNodeChanged() {
- for (auto& observer : audio_observers_)
- observer.OnActiveInputNodeChanged();
-}
-
void SystemTrayNotifier::AddClockObserver(ClockObserver* observer) {
clock_observers_.AddObserver(observer);
}
@@ -160,8 +125,45 @@ void SystemTrayNotifier::NotifyUserAddedToSession() {
observer.OnUserAddedToSession();
}
+////////////////////////////////////////////////////////////////////////////////
+
#if defined(OS_CHROMEOS)
+void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) {
+ audio_observers_.AddObserver(observer);
+}
+
+void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) {
+ audio_observers_.RemoveObserver(observer);
+}
+
+void SystemTrayNotifier::NotifyAudioOutputVolumeChanged(uint64_t node_id,
+ double volume) {
+ for (auto& observer : audio_observers_)
+ observer.OnOutputNodeVolumeChanged(node_id, volume);
+}
+
+void SystemTrayNotifier::NotifyAudioOutputMuteChanged(bool mute_on,
+ bool system_adjust) {
+ for (auto& observer : audio_observers_)
+ observer.OnOutputMuteChanged(mute_on, system_adjust);
+}
+
+void SystemTrayNotifier::NotifyAudioNodesChanged() {
+ for (auto& observer : audio_observers_)
+ observer.OnAudioNodesChanged();
+}
+
+void SystemTrayNotifier::NotifyAudioActiveOutputNodeChanged() {
+ for (auto& observer : audio_observers_)
+ observer.OnActiveOutputNodeChanged();
+}
+
+void SystemTrayNotifier::NotifyAudioActiveInputNodeChanged() {
+ for (auto& observer : audio_observers_)
+ observer.OnActiveInputNodeChanged();
+}
+
void SystemTrayNotifier::AddBluetoothObserver(BluetoothObserver* observer) {
bluetooth_observers_.AddObserver(observer);
}
« no previous file with comments | « ash/common/system/tray/system_tray_notifier.h ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698