| 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 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
| 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
| 14 #include "ash/system/audio/audio_observer.h" | 14 #include "ash/system/audio/audio_observer.h" |
| 15 #include "ash/system/chromeos/tray_tracing.h" | 15 #include "ash/system/chromeos/tray_tracing.h" |
| 16 #include "ash/system/date/clock_observer.h" | |
| 17 #include "ash/system/ime/ime_observer.h" | 16 #include "ash/system/ime/ime_observer.h" |
| 18 #include "ash/system/locale/locale_observer.h" | 17 #include "ash/system/locale/locale_observer.h" |
| 19 #include "ash/system/tray_accessibility.h" | 18 #include "ash/system/tray_accessibility.h" |
| 20 #include "ash/system/user/user_observer.h" | 19 #include "ash/system/user/user_observer.h" |
| 21 #include "base/macros.h" | 20 #include "base/macros.h" |
| 22 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
| 23 | 22 |
| 24 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 25 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" | 24 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" |
| 26 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" | 25 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 46 public: | 45 public: |
| 47 SystemTrayNotifier(); | 46 SystemTrayNotifier(); |
| 48 ~SystemTrayNotifier(); | 47 ~SystemTrayNotifier(); |
| 49 | 48 |
| 50 void AddAccessibilityObserver(AccessibilityObserver* observer); | 49 void AddAccessibilityObserver(AccessibilityObserver* observer); |
| 51 void RemoveAccessibilityObserver(AccessibilityObserver* observer); | 50 void RemoveAccessibilityObserver(AccessibilityObserver* observer); |
| 52 | 51 |
| 53 void AddAudioObserver(AudioObserver* observer); | 52 void AddAudioObserver(AudioObserver* observer); |
| 54 void RemoveAudioObserver(AudioObserver* observer); | 53 void RemoveAudioObserver(AudioObserver* observer); |
| 55 | 54 |
| 56 void AddClockObserver(ClockObserver* observer); | |
| 57 void RemoveClockObserver(ClockObserver* observer); | |
| 58 | |
| 59 void AddIMEObserver(IMEObserver* observer); | 55 void AddIMEObserver(IMEObserver* observer); |
| 60 void RemoveIMEObserver(IMEObserver* observer); | 56 void RemoveIMEObserver(IMEObserver* observer); |
| 61 | 57 |
| 62 void AddLocaleObserver(LocaleObserver* observer); | 58 void AddLocaleObserver(LocaleObserver* observer); |
| 63 void RemoveLocaleObserver(LocaleObserver* observer); | 59 void RemoveLocaleObserver(LocaleObserver* observer); |
| 64 | 60 |
| 65 void AddTracingObserver(TracingObserver* observer); | 61 void AddTracingObserver(TracingObserver* observer); |
| 66 void RemoveTracingObserver(TracingObserver* observer); | 62 void RemoveTracingObserver(TracingObserver* observer); |
| 67 | 63 |
| 68 void AddUserObserver(UserObserver* observer); | 64 void AddUserObserver(UserObserver* observer); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #endif | 102 #endif |
| 107 | 103 |
| 108 void NotifyAccessibilityModeChanged( | 104 void NotifyAccessibilityModeChanged( |
| 109 ui::AccessibilityNotificationVisibility notify); | 105 ui::AccessibilityNotificationVisibility notify); |
| 110 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); | 106 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); |
| 111 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); | 107 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); |
| 112 void NotifyAudioNodesChanged(); | 108 void NotifyAudioNodesChanged(); |
| 113 void NotifyAudioActiveOutputNodeChanged(); | 109 void NotifyAudioActiveOutputNodeChanged(); |
| 114 void NotifyAudioActiveInputNodeChanged(); | 110 void NotifyAudioActiveInputNodeChanged(); |
| 115 void NotifyTracingModeChanged(bool value); | 111 void NotifyTracingModeChanged(bool value); |
| 116 void NotifyRefreshClock(); | |
| 117 void NotifyDateFormatChanged(); | |
| 118 void NotifySystemClockTimeUpdated(); | |
| 119 void NotifySystemClockCanSetTimeChanged(bool can_set_time); | |
| 120 void NotifyRefreshIME(); | 112 void NotifyRefreshIME(); |
| 121 void NotifyRefreshIMEMenu(bool is_active); | 113 void NotifyRefreshIMEMenu(bool is_active); |
| 122 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, | 114 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, |
| 123 const std::string& cur_locale, | 115 const std::string& cur_locale, |
| 124 const std::string& from_locale, | 116 const std::string& from_locale, |
| 125 const std::string& to_locale); | 117 const std::string& to_locale); |
| 126 void NotifyUserUpdate(); | 118 void NotifyUserUpdate(); |
| 127 void NotifyUserAddedToSession(); | 119 void NotifyUserAddedToSession(); |
| 128 #if defined(OS_CHROMEOS) | 120 #if defined(OS_CHROMEOS) |
| 129 void NotifyRefreshBluetooth(); | 121 void NotifyRefreshBluetooth(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 142 void NotifyScreenShareStart(const base::Closure& stop_callback, | 134 void NotifyScreenShareStart(const base::Closure& stop_callback, |
| 143 const base::string16& helper_name); | 135 const base::string16& helper_name); |
| 144 void NotifyScreenShareStop(); | 136 void NotifyScreenShareStop(); |
| 145 void NotifyLastWindowClosed(); | 137 void NotifyLastWindowClosed(); |
| 146 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); | 138 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); |
| 147 #endif | 139 #endif |
| 148 | 140 |
| 149 private: | 141 private: |
| 150 base::ObserverList<AccessibilityObserver> accessibility_observers_; | 142 base::ObserverList<AccessibilityObserver> accessibility_observers_; |
| 151 base::ObserverList<AudioObserver> audio_observers_; | 143 base::ObserverList<AudioObserver> audio_observers_; |
| 152 base::ObserverList<ClockObserver> clock_observers_; | |
| 153 base::ObserverList<IMEObserver> ime_observers_; | 144 base::ObserverList<IMEObserver> ime_observers_; |
| 154 base::ObserverList<LocaleObserver> locale_observers_; | 145 base::ObserverList<LocaleObserver> locale_observers_; |
| 155 base::ObserverList<TracingObserver> tracing_observers_; | 146 base::ObserverList<TracingObserver> tracing_observers_; |
| 156 base::ObserverList<UserObserver> user_observers_; | 147 base::ObserverList<UserObserver> user_observers_; |
| 157 #if defined(OS_CHROMEOS) | 148 #if defined(OS_CHROMEOS) |
| 158 base::ObserverList<BluetoothObserver> bluetooth_observers_; | 149 base::ObserverList<BluetoothObserver> bluetooth_observers_; |
| 159 base::ObserverList<LogoutButtonObserver> logout_button_observers_; | 150 base::ObserverList<LogoutButtonObserver> logout_button_observers_; |
| 160 base::ObserverList<SessionLengthLimitObserver> | 151 base::ObserverList<SessionLengthLimitObserver> |
| 161 session_length_limit_observers_; | 152 session_length_limit_observers_; |
| 162 base::ObserverList<NetworkObserver> network_observers_; | 153 base::ObserverList<NetworkObserver> network_observers_; |
| 163 base::ObserverList<NetworkPortalDetectorObserver> | 154 base::ObserverList<NetworkPortalDetectorObserver> |
| 164 network_portal_detector_observers_; | 155 network_portal_detector_observers_; |
| 165 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; | 156 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; |
| 166 base::ObserverList<MediaCaptureObserver> media_capture_observers_; | 157 base::ObserverList<MediaCaptureObserver> media_capture_observers_; |
| 167 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; | 158 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; |
| 168 base::ObserverList<ScreenShareObserver> screen_share_observers_; | 159 base::ObserverList<ScreenShareObserver> screen_share_observers_; |
| 169 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; | 160 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; |
| 170 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; | 161 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; |
| 171 #endif | 162 #endif |
| 172 | 163 |
| 173 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); | 164 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); |
| 174 }; | 165 }; |
| 175 | 166 |
| 176 } // namespace ash | 167 } // namespace ash |
| 177 | 168 |
| 178 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 169 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
| OLD | NEW |