Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "ash/common/accessibility_types.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 class AccessibilityObserver; | 15 class AccessibilityObserver; |
| 16 class ClockObserver; | 16 class ClockObserver; |
| 17 class IMEObserver; | |
| 17 struct UpdateInfo; | 18 struct UpdateInfo; |
| 18 class UpdateObserver; | 19 class UpdateObserver; |
| 19 | 20 |
| 21 #if defined(OS_CHROMEOS) | |
| 22 class VirtualKeyboardObserver; | |
| 23 #endif | |
| 24 | |
| 20 // Observer and notification manager for the ash system tray. This version | 25 // Observer and notification manager for the ash system tray. This version |
| 21 // contains the observers that have been ported to //ash/common. See also | 26 // contains the observers that have been ported to //ash/common. See also |
| 22 // ash::SystemTrayNotifier. | 27 // ash::SystemTrayNotifier. |
| 23 // TODO(jamescook): After all the observers have been moved, rename this class | 28 // TODO(jamescook): After all the observers have been moved, rename this class |
| 24 // to SystemTrayNotifier. | 29 // to SystemTrayNotifier. |
| 25 class ASH_EXPORT WmSystemTrayNotifier { | 30 class ASH_EXPORT WmSystemTrayNotifier { |
| 26 public: | 31 public: |
| 27 WmSystemTrayNotifier(); | 32 WmSystemTrayNotifier(); |
| 28 ~WmSystemTrayNotifier(); | 33 ~WmSystemTrayNotifier(); |
| 29 | 34 |
| 30 void AddAccessibilityObserver(AccessibilityObserver* observer); | 35 void AddAccessibilityObserver(AccessibilityObserver* observer); |
| 31 void RemoveAccessibilityObserver(AccessibilityObserver* observer); | 36 void RemoveAccessibilityObserver(AccessibilityObserver* observer); |
| 32 | 37 |
| 33 void AddClockObserver(ClockObserver* observer); | 38 void AddClockObserver(ClockObserver* observer); |
| 34 void RemoveClockObserver(ClockObserver* observer); | 39 void RemoveClockObserver(ClockObserver* observer); |
| 35 | 40 |
| 41 void AddIMEObserver(IMEObserver* observer); | |
| 42 void RemoveIMEObserver(IMEObserver* observer); | |
| 43 | |
| 36 void AddUpdateObserver(UpdateObserver* observer); | 44 void AddUpdateObserver(UpdateObserver* observer); |
| 37 void RemoveUpdateObserver(UpdateObserver* observer); | 45 void RemoveUpdateObserver(UpdateObserver* observer); |
| 38 | 46 |
| 47 #if defined(OS_CHROMEOS) | |
| 48 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | |
| 49 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | |
| 50 #endif | |
| 51 | |
| 39 void NotifyAccessibilityModeChanged( | 52 void NotifyAccessibilityModeChanged( |
| 40 AccessibilityNotificationVisibility notify); | 53 AccessibilityNotificationVisibility notify); |
| 41 | 54 |
| 55 void NotifyRefreshIME(); | |
|
msw
2016/06/21 01:27:24
nit: order after notify.*clock (to parallel add/re
James Cook
2016/06/21 17:31:01
Given that I've screwed up function ordering in th
| |
| 56 void NotifyRefreshIMEMenu(bool is_active); | |
| 57 | |
| 42 void NotifyRefreshClock(); | 58 void NotifyRefreshClock(); |
| 43 void NotifyDateFormatChanged(); | 59 void NotifyDateFormatChanged(); |
| 44 void NotifySystemClockTimeUpdated(); | 60 void NotifySystemClockTimeUpdated(); |
| 45 void NotifySystemClockCanSetTimeChanged(bool can_set_time); | 61 void NotifySystemClockCanSetTimeChanged(bool can_set_time); |
| 46 | 62 |
| 47 void NotifyUpdateRecommended(const UpdateInfo& info); | 63 void NotifyUpdateRecommended(const UpdateInfo& info); |
| 48 | 64 |
| 65 #if defined(OS_CHROMEOS) | |
| 66 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); | |
| 67 #endif | |
| 68 | |
| 49 private: | 69 private: |
| 50 base::ObserverList<AccessibilityObserver> accessibility_observers_; | 70 base::ObserverList<AccessibilityObserver> accessibility_observers_; |
| 71 base::ObserverList<IMEObserver> ime_observers_; | |
| 51 base::ObserverList<ClockObserver> clock_observers_; | 72 base::ObserverList<ClockObserver> clock_observers_; |
| 52 base::ObserverList<UpdateObserver> update_observers_; | 73 base::ObserverList<UpdateObserver> update_observers_; |
| 53 | 74 |
| 75 #if defined(OS_CHROMEOS) | |
| 76 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; | |
| 77 #endif | |
| 78 | |
| 54 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); | 79 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); |
| 55 }; | 80 }; |
| 56 | 81 |
| 57 } // namespace ash | 82 } // namespace ash |
| 58 | 83 |
| 59 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ | 84 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ |
| OLD | NEW |