Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: ash/system/tray/system_tray_notifier.h

Issue 11312139: Add SystemTrayObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "ash/ash_export.h"
12 #include "ash/system/audio/audio_observer.h"
13 #include "ash/system/bluetooth/bluetooth_observer.h"
14 #include "ash/system/brightness/brightness_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/tray_accessibility.h"
24 #include "ash/system/tray_caps_lock.h"
25 #include "ash/system/user/update_observer.h"
26 #include "ash/system/user/user_observer.h"
27 #include "base/observer_list.h"
28
29 #if defined(OS_CHROMEOS)
30 #include "ash/system/chromeos/network/network_observer.h"
31 #include "ash/system/chromeos/network/sms_observer.h"
32 #endif
33
34 namespace ash {
35
36 class ASH_EXPORT SystemTrayNotifier {
37 public:
38 SystemTrayNotifier();
39 ~SystemTrayNotifier();
40
41 void AddAccessibilityObserver(AccessibilityObserver* observer);
42 void AddAudioObserver(AudioObserver* observer);
43 void AddBluetoothObserver(BluetoothObserver* observer);
44 void AddBrightnessObserver(BrightnessObserver* observer);
45 void AddCapsLockObserver(CapsLockObserver* observer);
46 void AddClockObserver(ClockObserver* observer);
47 void AddDriveObserver(DriveObserver* observer);
48 void AddIMEObserver(IMEObserver* observer);
49 void AddLocaleObserver(LocaleObserver* observer);
50 void AddLogoutButtonObserver(LogoutButtonObserver* observer);
51 void AddPowerStatusObserver(PowerStatusObserver* observer);
52 void AddUpdateObserver(UpdateObserver* observer);
53 void AddUserObserver(UserObserver* observer);
54 #if defined(OS_CHROMEOS)
55 void AddNetworkObserver(NetworkObserver* observer);
56 void AddVpnObserver(NetworkObserver* observer);
57 void AddSmsObserver(SmsObserver* observer);
58 #endif
59
60 void NotifyAccessibilityModeChanged(bool spoken_feedback_enabled);
61 void NotifyVolumeChanged(float level);
62 void NotifyMuteToggled();
63 void NotifyRefreshBluetooth();
64 void NotifyBluetoothDiscoveringChanged();
65 void NotifyBrightnessChanged(double level, bool user_initialted);
66 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock);
67 void NotifyRefreshClock();
68 void NotifyDateFormatChanged();
69 void NotifyRefreshDrive(DriveOperationStatusList& list);
70 void NotifyRefreshIME(bool show_message);
71 void NotifyShowLoginButtonChanged(bool show_login_button);
72 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
73 const std::string& cur_locale,
74 const std::string& from_locale,
75 const std::string& to_locale);
76 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status);
77 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity);
78 void NotifyUserUpdate();
79 #if defined(OS_CHROMEOS)
80 void NotifyRefreshNetwork(const NetworkIconInfo &info);
81 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate,
82 NetworkObserver::MessageType message_type,
83 const string16& title,
84 const string16& message,
85 const std::vector<string16>& links);
86 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type);
87 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info);
88 void NotifyWillToggleWifi();
89 void NotifyAddSmsMessage(const base::DictionaryValue& message);
90 #endif
91
92 private:
93 ObserverList<AccessibilityObserver> accessibility_observers_;
94 ObserverList<AudioObserver> audio_observers_;
95 ObserverList<BluetoothObserver> bluetooth_observers_;
96 ObserverList<BrightnessObserver> brightness_observers_;
97 ObserverList<CapsLockObserver> caps_lock_observers_;
98 ObserverList<ClockObserver> clock_observers_;
99 ObserverList<DriveObserver> drive_observers_;
100 ObserverList<IMEObserver> ime_observers_;
101 ObserverList<LocaleObserver> locale_observers_;
102 ObserverList<LogoutButtonObserver> logout_button_observers_;
103 ObserverList<PowerStatusObserver> power_status_observers_;
104 ObserverList<UpdateObserver> update_observers_;
105 ObserverList<UserObserver> user_observers_;
106 #if defined(OS_CHROMEOS)
107 ObserverList<NetworkObserver> network_observers_;
108 ObserverList<NetworkObserver> vpn_observers_;
109 ObserverList<SmsObserver> sms_observers_;
110 #endif
111
112 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
113 };
114
115 } // namespace ash
116
117 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698