Bluetooth: don't connect to unconnectable devices or disconnect
[chromium-blink-merge.git] / ash / system / tray / system_tray_notifier.h
blob76ad57924a5fbb8f9e406c73f32bd27dcad5cd85
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
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
8 #include <string>
9 #include <vector>
11 #include "ash/ash_export.h"
12 #include "ash/system/bluetooth/bluetooth_observer.h"
13 #include "ash/system/brightness/brightness_observer.h"
14 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
15 #include "ash/system/chromeos/network/network_observer.h"
16 #include "ash/system/chromeos/network/sms_observer.h"
17 #include "ash/system/date/clock_observer.h"
18 #include "ash/system/drive/drive_observer.h"
19 #include "ash/system/ime/ime_observer.h"
20 #include "ash/system/locale/locale_observer.h"
21 #include "ash/system/logout_button/logout_button_observer.h"
22 #include "ash/system/power/power_status_observer.h"
23 #include "ash/system/session_length_limit/session_length_limit_observer.h"
24 #include "ash/system/tray_accessibility.h"
25 #include "ash/system/tray_caps_lock.h"
26 #include "ash/system/user/update_observer.h"
27 #include "ash/system/user/user_observer.h"
28 #include "base/observer_list.h"
30 #if defined(OS_CHROMEOS)
31 #include "ash/system/chromeos/audio/audio_observer.h"
32 #include "ash/system/chromeos/network/network_observer.h"
33 #include "ash/system/chromeos/network/sms_observer.h"
34 #include "ash/system/chromeos/screen_capture/screen_capture_observer.h"
35 #endif
37 namespace ash {
39 class ASH_EXPORT SystemTrayNotifier {
40 public:
41 SystemTrayNotifier();
42 ~SystemTrayNotifier();
44 void AddAccessibilityObserver(AccessibilityObserver* observer);
45 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
47 void AddBluetoothObserver(BluetoothObserver* observer);
48 void RemoveBluetoothObserver(BluetoothObserver* observer);
50 void AddBrightnessObserver(BrightnessObserver* observer);
51 void RemoveBrightnessObserver(BrightnessObserver* observer);
53 void AddCapsLockObserver(CapsLockObserver* observer);
54 void RemoveCapsLockObserver(CapsLockObserver* observer);
56 void AddClockObserver(ClockObserver* observer);
57 void RemoveClockObserver(ClockObserver* observer);
59 void AddDriveObserver(DriveObserver* observer);
60 void RemoveDriveObserver(DriveObserver* observer);
62 void AddIMEObserver(IMEObserver* observer);
63 void RemoveIMEObserver(IMEObserver* observer);
65 void AddLocaleObserver(LocaleObserver* observer);
66 void RemoveLocaleObserver(LocaleObserver* observer);
68 void AddLogoutButtonObserver(LogoutButtonObserver* observer);
69 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer);
71 void AddPowerStatusObserver(PowerStatusObserver* observer);
72 void RemovePowerStatusObserver(PowerStatusObserver* observer);
74 void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
75 void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
77 void AddUpdateObserver(UpdateObserver* observer);
78 void RemoveUpdateObserver(UpdateObserver* observer);
80 void AddUserObserver(UserObserver* observer);
81 void RemoveUserObserver(UserObserver* observer);
83 #if defined(OS_CHROMEOS)
84 void AddAudioObserver(AudioObserver* observer);
85 void RemoveAudioObserver(AudioObserver* observer);
87 void AddNetworkObserver(NetworkObserver* observer);
88 void RemoveNetworkObserver(NetworkObserver* observer);
90 void AddVpnObserver(NetworkObserver* observer);
91 void RemoveVpnObserver(NetworkObserver* observer);
93 void AddSmsObserver(SmsObserver* observer);
94 void RemoveSmsObserver(SmsObserver* observer);
96 void AddEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
97 void RemoveEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
99 void AddScreenCaptureObserver(ScreenCaptureObserver* observer);
100 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer);
101 #endif
103 void NotifyAccessibilityModeChanged(
104 AccessibilityNotificationVisibility notify);
105 void NotifyRefreshBluetooth();
106 void NotifyBluetoothDiscoveringChanged();
107 void NotifyBrightnessChanged(double level, bool user_initialted);
108 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock);
109 void NotifyRefreshClock();
110 void NotifyDateFormatChanged();
111 void NotifySystemClockTimeUpdated();
112 void NotifyRefreshDrive(DriveOperationStatusList& list);
113 void NotifyRefreshIME(bool show_message);
114 void NotifyShowLoginButtonChanged(bool show_login_button);
115 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
116 const std::string& cur_locale,
117 const std::string& from_locale,
118 const std::string& to_locale);
119 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status);
120 void NotifySessionStartTimeChanged();
121 void NotifySessionLengthLimitChanged();
122 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity);
123 void NotifyUserUpdate();
124 #if defined(OS_CHROMEOS)
125 void NotifyVolumeChanged(float level);
126 void NotifyMuteToggled();
127 void NotifyRefreshNetwork(const NetworkIconInfo &info);
128 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate,
129 NetworkObserver::MessageType message_type,
130 NetworkObserver::NetworkType network_type,
131 const base::string16& title,
132 const base::string16& message,
133 const std::vector<base::string16>& links);
134 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type);
135 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info);
136 void NotifyWillToggleWifi();
137 void NotifyAddSmsMessage(const base::DictionaryValue& message);
138 void NotifyEnterpriseDomainChanged();
139 void NotifyScreenCaptureStart(const base::Closure& stop_callback,
140 const base::string16& sharing_app_name);
141 void NotifyScreenCaptureStop();
142 #endif
144 private:
145 ObserverList<AccessibilityObserver> accessibility_observers_;
146 ObserverList<BluetoothObserver> bluetooth_observers_;
147 ObserverList<BrightnessObserver> brightness_observers_;
148 ObserverList<CapsLockObserver> caps_lock_observers_;
149 ObserverList<ClockObserver> clock_observers_;
150 ObserverList<DriveObserver> drive_observers_;
151 ObserverList<IMEObserver> ime_observers_;
152 ObserverList<LocaleObserver> locale_observers_;
153 ObserverList<LogoutButtonObserver> logout_button_observers_;
154 ObserverList<PowerStatusObserver> power_status_observers_;
155 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_;
156 ObserverList<UpdateObserver> update_observers_;
157 ObserverList<UserObserver> user_observers_;
158 #if defined(OS_CHROMEOS)
159 ObserverList<AudioObserver> audio_observers_;
160 ObserverList<NetworkObserver> network_observers_;
161 ObserverList<NetworkObserver> vpn_observers_;
162 ObserverList<SmsObserver> sms_observers_;
163 ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
164 ObserverList<ScreenCaptureObserver> screen_capture_observers_;
165 #endif
167 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
170 } // namespace ash
172 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_