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

Side by Side Diff: ash/system/tray/system_tray_notifier.cc

Issue 2074913005: Convert TrayAccessibility to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webnotification
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/system/tray/tray_details_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 namespace ash { 7 namespace ash {
8 8
9 SystemTrayNotifier::SystemTrayNotifier() { 9 SystemTrayNotifier::SystemTrayNotifier() {
10 } 10 }
11 11
12 SystemTrayNotifier::~SystemTrayNotifier() { 12 SystemTrayNotifier::~SystemTrayNotifier() {
13 } 13 }
14 14
15 void SystemTrayNotifier::AddAccessibilityObserver(
16 AccessibilityObserver* observer) {
17 accessibility_observers_.AddObserver(observer);
18 }
19
20 void SystemTrayNotifier::RemoveAccessibilityObserver(
21 AccessibilityObserver* observer) {
22 accessibility_observers_.RemoveObserver(observer);
23 }
24
25 void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) { 15 void SystemTrayNotifier::AddAudioObserver(AudioObserver* observer) {
26 audio_observers_.AddObserver(observer); 16 audio_observers_.AddObserver(observer);
27 } 17 }
28 18
29 void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) { 19 void SystemTrayNotifier::RemoveAudioObserver(AudioObserver* observer) {
30 audio_observers_.RemoveObserver(observer); 20 audio_observers_.RemoveObserver(observer);
31 } 21 }
32 22
33 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) { 23 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) {
34 ime_observers_.AddObserver(observer); 24 ime_observers_.AddObserver(observer);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 VirtualKeyboardObserver* observer) { 154 VirtualKeyboardObserver* observer) {
165 virtual_keyboard_observers_.AddObserver(observer); 155 virtual_keyboard_observers_.AddObserver(observer);
166 } 156 }
167 157
168 void SystemTrayNotifier::RemoveVirtualKeyboardObserver( 158 void SystemTrayNotifier::RemoveVirtualKeyboardObserver(
169 VirtualKeyboardObserver* observer) { 159 VirtualKeyboardObserver* observer) {
170 virtual_keyboard_observers_.RemoveObserver(observer); 160 virtual_keyboard_observers_.RemoveObserver(observer);
171 } 161 }
172 #endif 162 #endif
173 163
174 void SystemTrayNotifier::NotifyAccessibilityModeChanged(
175 ui::AccessibilityNotificationVisibility notify) {
176 FOR_EACH_OBSERVER(
177 AccessibilityObserver,
178 accessibility_observers_,
179 OnAccessibilityModeChanged(notify));
180 }
181
182 void SystemTrayNotifier::NotifyAudioOutputVolumeChanged(uint64_t node_id, 164 void SystemTrayNotifier::NotifyAudioOutputVolumeChanged(uint64_t node_id,
183 double volume) { 165 double volume) {
184 FOR_EACH_OBSERVER(AudioObserver, audio_observers_, 166 FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
185 OnOutputNodeVolumeChanged(node_id, volume)); 167 OnOutputNodeVolumeChanged(node_id, volume));
186 } 168 }
187 169
188 void SystemTrayNotifier::NotifyAudioOutputMuteChanged(bool mute_on, 170 void SystemTrayNotifier::NotifyAudioOutputMuteChanged(bool mute_on,
189 bool system_adjust) { 171 bool system_adjust) {
190 FOR_EACH_OBSERVER(AudioObserver, audio_observers_, 172 FOR_EACH_OBSERVER(AudioObserver, audio_observers_,
191 OnOutputMuteChanged(mute_on, system_adjust)); 173 OnOutputMuteChanged(mute_on, system_adjust));
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( 329 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged(
348 bool suppressed) { 330 bool suppressed) {
349 FOR_EACH_OBSERVER(VirtualKeyboardObserver, 331 FOR_EACH_OBSERVER(VirtualKeyboardObserver,
350 virtual_keyboard_observers_, 332 virtual_keyboard_observers_,
351 OnKeyboardSuppressionChanged(suppressed)); 333 OnKeyboardSuppressionChanged(suppressed));
352 } 334 }
353 335
354 #endif // OS_CHROMEOS 336 #endif // OS_CHROMEOS
355 337
356 } // namespace ash 338 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/system/tray/tray_details_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698