| 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/ime/ime_observer.h" | 16 #include "ash/system/ime/ime_observer.h" |
| 17 #include "ash/system/locale/locale_observer.h" | 17 #include "ash/system/locale/locale_observer.h" |
| 18 #include "ash/system/tray_accessibility.h" | |
| 19 #include "ash/system/user/user_observer.h" | 18 #include "ash/system/user/user_observer.h" |
| 20 #include "base/macros.h" | 19 #include "base/macros.h" |
| 21 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 22 | 21 |
| 23 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 24 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" | 23 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" |
| 25 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" | 24 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" |
| 26 #include "ash/system/chromeos/network/network_observer.h" | 25 #include "ash/system/chromeos/network/network_observer.h" |
| 27 #include "ash/system/chromeos/network/network_portal_detector_observer.h" | 26 #include "ash/system/chromeos/network/network_portal_detector_observer.h" |
| 28 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" | 27 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 39 | 38 |
| 40 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 41 class NetworkStateNotifier; | 40 class NetworkStateNotifier; |
| 42 #endif | 41 #endif |
| 43 | 42 |
| 44 class ASH_EXPORT SystemTrayNotifier { | 43 class ASH_EXPORT SystemTrayNotifier { |
| 45 public: | 44 public: |
| 46 SystemTrayNotifier(); | 45 SystemTrayNotifier(); |
| 47 ~SystemTrayNotifier(); | 46 ~SystemTrayNotifier(); |
| 48 | 47 |
| 49 void AddAccessibilityObserver(AccessibilityObserver* observer); | |
| 50 void RemoveAccessibilityObserver(AccessibilityObserver* observer); | |
| 51 | |
| 52 void AddAudioObserver(AudioObserver* observer); | 48 void AddAudioObserver(AudioObserver* observer); |
| 53 void RemoveAudioObserver(AudioObserver* observer); | 49 void RemoveAudioObserver(AudioObserver* observer); |
| 54 | 50 |
| 55 void AddIMEObserver(IMEObserver* observer); | 51 void AddIMEObserver(IMEObserver* observer); |
| 56 void RemoveIMEObserver(IMEObserver* observer); | 52 void RemoveIMEObserver(IMEObserver* observer); |
| 57 | 53 |
| 58 void AddLocaleObserver(LocaleObserver* observer); | 54 void AddLocaleObserver(LocaleObserver* observer); |
| 59 void RemoveLocaleObserver(LocaleObserver* observer); | 55 void RemoveLocaleObserver(LocaleObserver* observer); |
| 60 | 56 |
| 61 void AddTracingObserver(TracingObserver* observer); | 57 void AddTracingObserver(TracingObserver* observer); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void AddScreenShareObserver(ScreenShareObserver* observer); | 90 void AddScreenShareObserver(ScreenShareObserver* observer); |
| 95 void RemoveScreenShareObserver(ScreenShareObserver* observer); | 91 void RemoveScreenShareObserver(ScreenShareObserver* observer); |
| 96 | 92 |
| 97 void AddLastWindowClosedObserver(LastWindowClosedObserver* observer); | 93 void AddLastWindowClosedObserver(LastWindowClosedObserver* observer); |
| 98 void RemoveLastWindowClosedObserver(LastWindowClosedObserver* observer); | 94 void RemoveLastWindowClosedObserver(LastWindowClosedObserver* observer); |
| 99 | 95 |
| 100 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 96 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 101 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 97 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 102 #endif | 98 #endif |
| 103 | 99 |
| 104 void NotifyAccessibilityModeChanged( | |
| 105 ui::AccessibilityNotificationVisibility notify); | |
| 106 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); | 100 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); |
| 107 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); | 101 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); |
| 108 void NotifyAudioNodesChanged(); | 102 void NotifyAudioNodesChanged(); |
| 109 void NotifyAudioActiveOutputNodeChanged(); | 103 void NotifyAudioActiveOutputNodeChanged(); |
| 110 void NotifyAudioActiveInputNodeChanged(); | 104 void NotifyAudioActiveInputNodeChanged(); |
| 111 void NotifyTracingModeChanged(bool value); | 105 void NotifyTracingModeChanged(bool value); |
| 112 void NotifyRefreshIME(); | 106 void NotifyRefreshIME(); |
| 113 void NotifyRefreshIMEMenu(bool is_active); | 107 void NotifyRefreshIMEMenu(bool is_active); |
| 114 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, | 108 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, |
| 115 const std::string& cur_locale, | 109 const std::string& cur_locale, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 132 const base::string16& sharing_app_name); | 126 const base::string16& sharing_app_name); |
| 133 void NotifyScreenCaptureStop(); | 127 void NotifyScreenCaptureStop(); |
| 134 void NotifyScreenShareStart(const base::Closure& stop_callback, | 128 void NotifyScreenShareStart(const base::Closure& stop_callback, |
| 135 const base::string16& helper_name); | 129 const base::string16& helper_name); |
| 136 void NotifyScreenShareStop(); | 130 void NotifyScreenShareStop(); |
| 137 void NotifyLastWindowClosed(); | 131 void NotifyLastWindowClosed(); |
| 138 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); | 132 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); |
| 139 #endif | 133 #endif |
| 140 | 134 |
| 141 private: | 135 private: |
| 142 base::ObserverList<AccessibilityObserver> accessibility_observers_; | |
| 143 base::ObserverList<AudioObserver> audio_observers_; | 136 base::ObserverList<AudioObserver> audio_observers_; |
| 144 base::ObserverList<IMEObserver> ime_observers_; | 137 base::ObserverList<IMEObserver> ime_observers_; |
| 145 base::ObserverList<LocaleObserver> locale_observers_; | 138 base::ObserverList<LocaleObserver> locale_observers_; |
| 146 base::ObserverList<TracingObserver> tracing_observers_; | 139 base::ObserverList<TracingObserver> tracing_observers_; |
| 147 base::ObserverList<UserObserver> user_observers_; | 140 base::ObserverList<UserObserver> user_observers_; |
| 148 #if defined(OS_CHROMEOS) | 141 #if defined(OS_CHROMEOS) |
| 149 base::ObserverList<BluetoothObserver> bluetooth_observers_; | 142 base::ObserverList<BluetoothObserver> bluetooth_observers_; |
| 150 base::ObserverList<LogoutButtonObserver> logout_button_observers_; | 143 base::ObserverList<LogoutButtonObserver> logout_button_observers_; |
| 151 base::ObserverList<SessionLengthLimitObserver> | 144 base::ObserverList<SessionLengthLimitObserver> |
| 152 session_length_limit_observers_; | 145 session_length_limit_observers_; |
| 153 base::ObserverList<NetworkObserver> network_observers_; | 146 base::ObserverList<NetworkObserver> network_observers_; |
| 154 base::ObserverList<NetworkPortalDetectorObserver> | 147 base::ObserverList<NetworkPortalDetectorObserver> |
| 155 network_portal_detector_observers_; | 148 network_portal_detector_observers_; |
| 156 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; | 149 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; |
| 157 base::ObserverList<MediaCaptureObserver> media_capture_observers_; | 150 base::ObserverList<MediaCaptureObserver> media_capture_observers_; |
| 158 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; | 151 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; |
| 159 base::ObserverList<ScreenShareObserver> screen_share_observers_; | 152 base::ObserverList<ScreenShareObserver> screen_share_observers_; |
| 160 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; | 153 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; |
| 161 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; | 154 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; |
| 162 #endif | 155 #endif |
| 163 | 156 |
| 164 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); | 157 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); |
| 165 }; | 158 }; |
| 166 | 159 |
| 167 } // namespace ash | 160 } // namespace ash |
| 168 | 161 |
| 169 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 162 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
| OLD | NEW |