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

Unified Diff: ash/system/tray/system_tray_notifier.cc

Issue 11568036: Add countdown when session time is limited (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/system/tray/test_system_tray_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_notifier.cc
diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc
index e865550fb63a675ef5bb84bf3f0b50891290bc99..77af895a472083c3489a11dfba985cf908138550 100644
--- a/ash/system/tray/system_tray_notifier.cc
+++ b/ash/system/tray/system_tray_notifier.cc
@@ -107,6 +107,16 @@ void SystemTrayNotifier::RemovePowerStatusObserver(
power_status_observers_.RemoveObserver(observer);
}
+void SystemTrayNotifier::AddSessionLengthLimitObserver(
+ SessionLengthLimitObserver* observer) {
+ session_length_limit_observers_.AddObserver(observer);
+}
+
+void SystemTrayNotifier::RemoveSessionLengthLimitObserver(
+ SessionLengthLimitObserver* observer) {
+ session_length_limit_observers_.RemoveObserver(observer);
+}
+
void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
update_observers_.AddObserver(observer);
}
@@ -243,6 +253,20 @@ void SystemTrayNotifier::NotifyPowerStatusChanged(
OnPowerStatusChanged(power_status));
}
+void SystemTrayNotifier::NotifySessionStartTimeChanged(
+ const base::Time& session_start_time) {
+ FOR_EACH_OBSERVER(SessionLengthLimitObserver,
+ session_length_limit_observers_,
+ OnSessionStartTimeChanged(session_start_time));
+}
+
+void SystemTrayNotifier::NotifySessionLengthLimitChanged(
+ const base::TimeDelta& limit) {
+ FOR_EACH_OBSERVER(SessionLengthLimitObserver,
+ session_length_limit_observers_,
+ OnSessionLengthLimitChanged(limit));
+}
+
void SystemTrayNotifier::NotifyUpdateRecommended(
UpdateObserver::UpdateSeverity severity) {
FOR_EACH_OBSERVER(UpdateObserver,
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | ash/system/tray/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698