| 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 "ash/common/system/locale/locale_observer.h" | 10 #include "ash/common/system/locale/locale_observer.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 | 15 |
| 16 class AccessibilityObserver; | 16 class AccessibilityObserver; |
| 17 class AudioObserver; | 17 class AudioObserver; |
| 18 class ClockObserver; | 18 class ClockObserver; |
| 19 class IMEObserver; | 19 class IMEObserver; |
| 20 struct UpdateInfo; | 20 struct UpdateInfo; |
| 21 class UpdateObserver; | 21 class UpdateObserver; |
| 22 | 22 |
| 23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 24 class TracingObserver; |
| 24 class VirtualKeyboardObserver; | 25 class VirtualKeyboardObserver; |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 // Observer and notification manager for the ash system tray. This version | 28 // Observer and notification manager for the ash system tray. This version |
| 28 // contains the observers that have been ported to //ash/common. See also | 29 // contains the observers that have been ported to //ash/common. See also |
| 29 // ash::SystemTrayNotifier. | 30 // ash::SystemTrayNotifier. |
| 30 // TODO(jamescook): After all the observers have been moved, rename this class | 31 // TODO(jamescook): After all the observers have been moved, rename this class |
| 31 // to SystemTrayNotifier. | 32 // to SystemTrayNotifier. |
| 32 class ASH_EXPORT WmSystemTrayNotifier { | 33 class ASH_EXPORT WmSystemTrayNotifier { |
| 33 public: | 34 public: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const std::string& cur_locale, | 71 const std::string& cur_locale, |
| 71 const std::string& from_locale, | 72 const std::string& from_locale, |
| 72 const std::string& to_locale); | 73 const std::string& to_locale); |
| 73 | 74 |
| 74 // OS updates. | 75 // OS updates. |
| 75 void AddUpdateObserver(UpdateObserver* observer); | 76 void AddUpdateObserver(UpdateObserver* observer); |
| 76 void RemoveUpdateObserver(UpdateObserver* observer); | 77 void RemoveUpdateObserver(UpdateObserver* observer); |
| 77 void NotifyUpdateRecommended(const UpdateInfo& info); | 78 void NotifyUpdateRecommended(const UpdateInfo& info); |
| 78 | 79 |
| 79 #if defined(OS_CHROMEOS) | 80 #if defined(OS_CHROMEOS) |
| 81 // Tracing. |
| 82 void AddTracingObserver(TracingObserver* observer); |
| 83 void RemoveTracingObserver(TracingObserver* observer); |
| 84 void NotifyTracingModeChanged(bool value); |
| 85 |
| 80 // Virtual keyboard. | 86 // Virtual keyboard. |
| 81 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 87 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 82 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 88 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 83 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); | 89 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); |
| 84 #endif | 90 #endif |
| 85 | 91 |
| 86 private: | 92 private: |
| 87 base::ObserverList<AccessibilityObserver> accessibility_observers_; | 93 base::ObserverList<AccessibilityObserver> accessibility_observers_; |
| 88 base::ObserverList<AudioObserver> audio_observers_; | 94 base::ObserverList<AudioObserver> audio_observers_; |
| 89 base::ObserverList<ClockObserver> clock_observers_; | 95 base::ObserverList<ClockObserver> clock_observers_; |
| 90 base::ObserverList<IMEObserver> ime_observers_; | 96 base::ObserverList<IMEObserver> ime_observers_; |
| 91 base::ObserverList<LocaleObserver> locale_observers_; | 97 base::ObserverList<LocaleObserver> locale_observers_; |
| 92 base::ObserverList<UpdateObserver> update_observers_; | 98 base::ObserverList<UpdateObserver> update_observers_; |
| 93 | 99 |
| 94 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
| 101 base::ObserverList<TracingObserver> tracing_observers_; |
| 95 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; | 102 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; |
| 96 #endif | 103 #endif |
| 97 | 104 |
| 98 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); | 105 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); |
| 99 }; | 106 }; |
| 100 | 107 |
| 101 } // namespace ash | 108 } // namespace ash |
| 102 | 109 |
| 103 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ | 110 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ |
| OLD | NEW |