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

Side by Side Diff: ash/common/system/tray/wm_system_tray_notifier.h

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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/accessibility_types.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/observer_list.h" 11 #include "base/observer_list.h"
11 12
12 namespace ash { 13 namespace ash {
13 14
15 class AccessibilityObserver;
14 class ClockObserver; 16 class ClockObserver;
15 struct UpdateInfo; 17 struct UpdateInfo;
16 class UpdateObserver; 18 class UpdateObserver;
17 19
18 // Observer and notification manager for the ash system tray. This version 20 // Observer and notification manager for the ash system tray. This version
19 // contains the observers that have been ported to //ash/common. See also 21 // contains the observers that have been ported to //ash/common. See also
20 // ash::SystemTrayNotifier. 22 // ash::SystemTrayNotifier.
21 // TODO(jamescook): After all the observers have been moved, rename this class 23 // TODO(jamescook): After all the observers have been moved, rename this class
22 // to SystemTrayNotifier. 24 // to SystemTrayNotifier.
23 class ASH_EXPORT WmSystemTrayNotifier { 25 class ASH_EXPORT WmSystemTrayNotifier {
24 public: 26 public:
25 WmSystemTrayNotifier(); 27 WmSystemTrayNotifier();
26 ~WmSystemTrayNotifier(); 28 ~WmSystemTrayNotifier();
27 29
30 void AddAccessibilityObserver(AccessibilityObserver* observer);
31 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
32
28 void AddClockObserver(ClockObserver* observer); 33 void AddClockObserver(ClockObserver* observer);
29 void RemoveClockObserver(ClockObserver* observer); 34 void RemoveClockObserver(ClockObserver* observer);
30 35
31 void AddUpdateObserver(UpdateObserver* observer); 36 void AddUpdateObserver(UpdateObserver* observer);
32 void RemoveUpdateObserver(UpdateObserver* observer); 37 void RemoveUpdateObserver(UpdateObserver* observer);
33 38
39 void NotifyAccessibilityModeChanged(
40 ui::AccessibilityNotificationVisibility notify);
41
34 void NotifyRefreshClock(); 42 void NotifyRefreshClock();
35 void NotifyDateFormatChanged(); 43 void NotifyDateFormatChanged();
36 void NotifySystemClockTimeUpdated(); 44 void NotifySystemClockTimeUpdated();
37 void NotifySystemClockCanSetTimeChanged(bool can_set_time); 45 void NotifySystemClockCanSetTimeChanged(bool can_set_time);
38 46
39 void NotifyUpdateRecommended(const UpdateInfo& info); 47 void NotifyUpdateRecommended(const UpdateInfo& info);
40 48
41 private: 49 private:
50 base::ObserverList<AccessibilityObserver> accessibility_observers_;
42 base::ObserverList<ClockObserver> clock_observers_; 51 base::ObserverList<ClockObserver> clock_observers_;
43 base::ObserverList<UpdateObserver> update_observers_; 52 base::ObserverList<UpdateObserver> update_observers_;
44 53
45 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); 54 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier);
46 }; 55 };
47 56
48 } // namespace ash 57 } // namespace ash
49 58
50 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ 59 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/common/system/accessibility_observer.h ('k') | ash/common/system/tray/wm_system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698