| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tray/system_tray_notifier.h" | 5 #include "ash/system/tray/system_tray_notifier.h" |
| 6 | 6 |
| 7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
| 8 #include "ash/system/chromeos/network/network_state_notifier.h" | 8 #include "ash/system/chromeos/network/network_state_notifier.h" |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 void SystemTrayNotifier::AddAccessibilityObserver( | 22 void SystemTrayNotifier::AddAccessibilityObserver( |
| 23 AccessibilityObserver* observer) { | 23 AccessibilityObserver* observer) { |
| 24 accessibility_observers_.AddObserver(observer); | 24 accessibility_observers_.AddObserver(observer); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void SystemTrayNotifier::RemoveAccessibilityObserver( | 27 void SystemTrayNotifier::RemoveAccessibilityObserver( |
| 28 AccessibilityObserver* observer) { | 28 AccessibilityObserver* observer) { |
| 29 accessibility_observers_.RemoveObserver(observer); | 29 accessibility_observers_.RemoveObserver(observer); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) { | |
| 33 audio_observers_.AddObserver(observer); | |
| 34 } | |
| 35 | |
| 36 void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) { | |
| 37 audio_observers_.RemoveObserver(observer); | |
| 38 } | |
| 39 | |
| 40 void SystemTrayNotifier::AddBluetoothObserver(BluetoothObserver* observer) { | 32 void SystemTrayNotifier::AddBluetoothObserver(BluetoothObserver* observer) { |
| 41 bluetooth_observers_.AddObserver(observer); | 33 bluetooth_observers_.AddObserver(observer); |
| 42 } | 34 } |
| 43 | 35 |
| 44 void SystemTrayNotifier::RemoveBluetoothObserver(BluetoothObserver* observer) { | 36 void SystemTrayNotifier::RemoveBluetoothObserver(BluetoothObserver* observer) { |
| 45 bluetooth_observers_.RemoveObserver(observer); | 37 bluetooth_observers_.RemoveObserver(observer); |
| 46 } | 38 } |
| 47 | 39 |
| 48 void SystemTrayNotifier::AddCapsLockObserver(CapsLockObserver* observer) { | 40 void SystemTrayNotifier::AddCapsLockObserver(CapsLockObserver* observer) { |
| 49 caps_lock_observers_.AddObserver(observer); | 41 caps_lock_observers_.AddObserver(observer); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 #endif | 163 #endif |
| 172 | 164 |
| 173 void SystemTrayNotifier::NotifyAccessibilityModeChanged( | 165 void SystemTrayNotifier::NotifyAccessibilityModeChanged( |
| 174 AccessibilityNotificationVisibility notify) { | 166 AccessibilityNotificationVisibility notify) { |
| 175 FOR_EACH_OBSERVER( | 167 FOR_EACH_OBSERVER( |
| 176 AccessibilityObserver, | 168 AccessibilityObserver, |
| 177 accessibility_observers_, | 169 accessibility_observers_, |
| 178 OnAccessibilityModeChanged(notify)); | 170 OnAccessibilityModeChanged(notify)); |
| 179 } | 171 } |
| 180 | 172 |
| 181 void SystemTrayNotifier::NotifyAudioOutputVolumeChanged() { | |
| 182 FOR_EACH_OBSERVER( | |
| 183 AudioObserver, | |
| 184 audio_observers_, | |
| 185 OnOutputVolumeChanged()); | |
| 186 } | |
| 187 | |
| 188 void SystemTrayNotifier::NotifyAudioOutputMuteChanged() { | |
| 189 FOR_EACH_OBSERVER( | |
| 190 AudioObserver, | |
| 191 audio_observers_, | |
| 192 OnOutputMuteChanged()); | |
| 193 } | |
| 194 | |
| 195 void SystemTrayNotifier::NotifyAudioNodesChanged() { | |
| 196 FOR_EACH_OBSERVER( | |
| 197 AudioObserver, | |
| 198 audio_observers_, | |
| 199 OnAudioNodesChanged()); | |
| 200 } | |
| 201 | |
| 202 void SystemTrayNotifier::NotifyAudioActiveOutputNodeChanged() { | |
| 203 FOR_EACH_OBSERVER( | |
| 204 AudioObserver, | |
| 205 audio_observers_, | |
| 206 OnActiveOutputNodeChanged()); | |
| 207 } | |
| 208 | |
| 209 void SystemTrayNotifier::NotifyAudioActiveInputNodeChanged() { | |
| 210 FOR_EACH_OBSERVER( | |
| 211 AudioObserver, | |
| 212 audio_observers_, | |
| 213 OnActiveInputNodeChanged()); | |
| 214 } | |
| 215 | |
| 216 void SystemTrayNotifier::NotifyTracingModeChanged(bool value) { | 173 void SystemTrayNotifier::NotifyTracingModeChanged(bool value) { |
| 217 FOR_EACH_OBSERVER( | 174 FOR_EACH_OBSERVER( |
| 218 TracingObserver, | 175 TracingObserver, |
| 219 tracing_observers_, | 176 tracing_observers_, |
| 220 OnTracingModeChanged(value)); | 177 OnTracingModeChanged(value)); |
| 221 } | 178 } |
| 222 | 179 |
| 223 void SystemTrayNotifier::NotifyRefreshBluetooth() { | 180 void SystemTrayNotifier::NotifyRefreshBluetooth() { |
| 224 FOR_EACH_OBSERVER(BluetoothObserver, | 181 FOR_EACH_OBSERVER(BluetoothObserver, |
| 225 bluetooth_observers_, | 182 bluetooth_observers_, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 314 } |
| 358 | 315 |
| 359 void SystemTrayNotifier::NotifyScreenShareStop() { | 316 void SystemTrayNotifier::NotifyScreenShareStop() { |
| 360 FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_, | 317 FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_, |
| 361 OnScreenShareStop()); | 318 OnScreenShareStop()); |
| 362 } | 319 } |
| 363 | 320 |
| 364 #endif // OS_CHROMEOS | 321 #endif // OS_CHROMEOS |
| 365 | 322 |
| 366 } // namespace ash | 323 } // namespace ash |
| OLD | NEW |