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

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

Issue 11568036: Add countdown when session time is limited (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
OLDNEW
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/system/audio/audio_observer.h" 12 #include "ash/system/audio/audio_observer.h"
13 #include "ash/system/bluetooth/bluetooth_observer.h" 13 #include "ash/system/bluetooth/bluetooth_observer.h"
14 #include "ash/system/brightness/brightness_observer.h" 14 #include "ash/system/brightness/brightness_observer.h"
15 #include "ash/system/chromeos/network/network_observer.h" 15 #include "ash/system/chromeos/network/network_observer.h"
16 #include "ash/system/chromeos/network/sms_observer.h" 16 #include "ash/system/chromeos/network/sms_observer.h"
17 #include "ash/system/date/clock_observer.h" 17 #include "ash/system/date/clock_observer.h"
18 #include "ash/system/drive/drive_observer.h" 18 #include "ash/system/drive/drive_observer.h"
19 #include "ash/system/ime/ime_observer.h" 19 #include "ash/system/ime/ime_observer.h"
20 #include "ash/system/locale/locale_observer.h" 20 #include "ash/system/locale/locale_observer.h"
21 #include "ash/system/logout_button/logout_button_observer.h" 21 #include "ash/system/logout_button/logout_button_observer.h"
22 #include "ash/system/power/power_status_observer.h" 22 #include "ash/system/power/power_status_observer.h"
23 #include "ash/system/session_length_limit/session_length_limit_observer.h"
23 #include "ash/system/tray_accessibility.h" 24 #include "ash/system/tray_accessibility.h"
24 #include "ash/system/tray_caps_lock.h" 25 #include "ash/system/tray_caps_lock.h"
25 #include "ash/system/user/update_observer.h" 26 #include "ash/system/user/update_observer.h"
26 #include "ash/system/user/user_observer.h" 27 #include "ash/system/user/user_observer.h"
27 #include "base/observer_list.h" 28 #include "base/observer_list.h"
29 #include "base/time.h"
28 30
29 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
30 #include "ash/system/chromeos/network/network_observer.h" 32 #include "ash/system/chromeos/network/network_observer.h"
31 #include "ash/system/chromeos/network/sms_observer.h" 33 #include "ash/system/chromeos/network/sms_observer.h"
32 #endif 34 #endif
33 35
34 namespace ash { 36 namespace ash {
35 37
36 class ASH_EXPORT SystemTrayNotifier { 38 class ASH_EXPORT SystemTrayNotifier {
37 public: 39 public:
(...skipping 26 matching lines...) Expand all
64 66
65 void AddLocaleObserver(LocaleObserver* observer); 67 void AddLocaleObserver(LocaleObserver* observer);
66 void RemoveLocaleObserver(LocaleObserver* observer); 68 void RemoveLocaleObserver(LocaleObserver* observer);
67 69
68 void AddLogoutButtonObserver(LogoutButtonObserver* observer); 70 void AddLogoutButtonObserver(LogoutButtonObserver* observer);
69 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer); 71 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer);
70 72
71 void AddPowerStatusObserver(PowerStatusObserver* observer); 73 void AddPowerStatusObserver(PowerStatusObserver* observer);
72 void RemovePowerStatusObserver(PowerStatusObserver* observer); 74 void RemovePowerStatusObserver(PowerStatusObserver* observer);
73 75
76 void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
77 void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
78
74 void AddUpdateObserver(UpdateObserver* observer); 79 void AddUpdateObserver(UpdateObserver* observer);
75 void RemoveUpdateObserver(UpdateObserver* observer); 80 void RemoveUpdateObserver(UpdateObserver* observer);
76 81
77 void AddUserObserver(UserObserver* observer); 82 void AddUserObserver(UserObserver* observer);
78 void RemoveUserObserver(UserObserver* observer); 83 void RemoveUserObserver(UserObserver* observer);
79 84
80 #if defined(OS_CHROMEOS) 85 #if defined(OS_CHROMEOS)
81 void AddNetworkObserver(NetworkObserver* observer); 86 void AddNetworkObserver(NetworkObserver* observer);
82 void RemoveNetworkObserver(NetworkObserver* observer); 87 void RemoveNetworkObserver(NetworkObserver* observer);
83 88
(...skipping 15 matching lines...) Expand all
99 void NotifyRefreshClock(); 104 void NotifyRefreshClock();
100 void NotifyDateFormatChanged(); 105 void NotifyDateFormatChanged();
101 void NotifyRefreshDrive(DriveOperationStatusList& list); 106 void NotifyRefreshDrive(DriveOperationStatusList& list);
102 void NotifyRefreshIME(bool show_message); 107 void NotifyRefreshIME(bool show_message);
103 void NotifyShowLoginButtonChanged(bool show_login_button); 108 void NotifyShowLoginButtonChanged(bool show_login_button);
104 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, 109 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
105 const std::string& cur_locale, 110 const std::string& cur_locale,
106 const std::string& from_locale, 111 const std::string& from_locale,
107 const std::string& to_locale); 112 const std::string& to_locale);
108 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status); 113 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status);
114 void NotifySessionLengthUnlimited();
115 void NotifyRemainingSessionTimeChanged(const base::TimeDelta& remaining);
109 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity); 116 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity);
110 void NotifyUserUpdate(); 117 void NotifyUserUpdate();
111 #if defined(OS_CHROMEOS) 118 #if defined(OS_CHROMEOS)
112 void NotifyRefreshNetwork(const NetworkIconInfo &info); 119 void NotifyRefreshNetwork(const NetworkIconInfo &info);
113 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate, 120 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate,
114 NetworkObserver::MessageType message_type, 121 NetworkObserver::MessageType message_type,
115 NetworkObserver::NetworkType network_type, 122 NetworkObserver::NetworkType network_type,
116 const string16& title, 123 const string16& title,
117 const string16& message, 124 const string16& message,
118 const std::vector<string16>& links); 125 const std::vector<string16>& links);
119 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type); 126 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type);
120 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info); 127 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info);
121 void NotifyWillToggleWifi(); 128 void NotifyWillToggleWifi();
122 void NotifyAddSmsMessage(const base::DictionaryValue& message); 129 void NotifyAddSmsMessage(const base::DictionaryValue& message);
123 #endif 130 #endif
124 131
125 private: 132 private:
126 ObserverList<AccessibilityObserver> accessibility_observers_; 133 ObserverList<AccessibilityObserver> accessibility_observers_;
127 ObserverList<AudioObserver> audio_observers_; 134 ObserverList<AudioObserver> audio_observers_;
128 ObserverList<BluetoothObserver> bluetooth_observers_; 135 ObserverList<BluetoothObserver> bluetooth_observers_;
129 ObserverList<BrightnessObserver> brightness_observers_; 136 ObserverList<BrightnessObserver> brightness_observers_;
130 ObserverList<CapsLockObserver> caps_lock_observers_; 137 ObserverList<CapsLockObserver> caps_lock_observers_;
131 ObserverList<ClockObserver> clock_observers_; 138 ObserverList<ClockObserver> clock_observers_;
132 ObserverList<DriveObserver> drive_observers_; 139 ObserverList<DriveObserver> drive_observers_;
133 ObserverList<IMEObserver> ime_observers_; 140 ObserverList<IMEObserver> ime_observers_;
134 ObserverList<LocaleObserver> locale_observers_; 141 ObserverList<LocaleObserver> locale_observers_;
135 ObserverList<LogoutButtonObserver> logout_button_observers_; 142 ObserverList<LogoutButtonObserver> logout_button_observers_;
136 ObserverList<PowerStatusObserver> power_status_observers_; 143 ObserverList<PowerStatusObserver> power_status_observers_;
144 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_;
137 ObserverList<UpdateObserver> update_observers_; 145 ObserverList<UpdateObserver> update_observers_;
138 ObserverList<UserObserver> user_observers_; 146 ObserverList<UserObserver> user_observers_;
139 #if defined(OS_CHROMEOS) 147 #if defined(OS_CHROMEOS)
140 ObserverList<NetworkObserver> network_observers_; 148 ObserverList<NetworkObserver> network_observers_;
141 ObserverList<NetworkObserver> vpn_observers_; 149 ObserverList<NetworkObserver> vpn_observers_;
142 ObserverList<SmsObserver> sms_observers_; 150 ObserverList<SmsObserver> sms_observers_;
143 #endif 151 #endif
144 152
145 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); 153 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
146 }; 154 };
147 155
148 } // namespace ash 156 } // namespace ash
149 157
150 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 158 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698