Chromium Code Reviews| 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 #include "ash/system/tray/system_tray_notifier.h" | 5 #include "ash/system/tray/system_tray_notifier.h" |
| 6 #include "base/time/time.h" | |
| 6 | 7 |
| 7 #if defined(OS_CHROMEOS) | 8 #if defined(OS_CHROMEOS) |
| 8 #include "ash/system/chromeos/network/network_state_notifier.h" | 9 #include "ash/system/chromeos/network/network_state_notifier.h" |
| 9 #endif | 10 #endif |
| 10 | 11 |
| 11 namespace ash { | 12 namespace ash { |
| 12 | 13 |
| 13 SystemTrayNotifier::SystemTrayNotifier() { | 14 SystemTrayNotifier::SystemTrayNotifier() { |
| 14 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
| 15 network_state_notifier_.reset(new NetworkStateNotifier()); | 16 network_state_notifier_.reset(new NetworkStateNotifier()); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 ime_observers_, | 226 ime_observers_, |
| 226 OnIMERefresh(show_message)); | 227 OnIMERefresh(show_message)); |
| 227 } | 228 } |
| 228 | 229 |
| 229 void SystemTrayNotifier::NotifyShowLoginButtonChanged(bool show_login_button) { | 230 void SystemTrayNotifier::NotifyShowLoginButtonChanged(bool show_login_button) { |
| 230 FOR_EACH_OBSERVER(LogoutButtonObserver, | 231 FOR_EACH_OBSERVER(LogoutButtonObserver, |
| 231 logout_button_observers_, | 232 logout_button_observers_, |
| 232 OnShowLogoutButtonInTrayChanged(show_login_button)); | 233 OnShowLogoutButtonInTrayChanged(show_login_button)); |
| 233 } | 234 } |
| 234 | 235 |
| 236 void SystemTrayNotifier::NotifyLogoutDialogDurationChanged(int duration_ms) { | |
| 237 const base::TimeDelta duration = base::TimeDelta::FromMilliseconds(duration_ms ); | |
|
bartfab (slow)
2013/12/03 19:46:04
Nit: This line is more than 80 characters long now
binjin
2013/12/04 10:47:03
Done.
| |
| 238 FOR_EACH_OBSERVER(LogoutButtonObserver, | |
| 239 logout_button_observers_, | |
| 240 OnLogoutDialogDurationChanged(duration)); | |
| 241 } | |
| 242 | |
| 235 void SystemTrayNotifier::NotifyLocaleChanged( | 243 void SystemTrayNotifier::NotifyLocaleChanged( |
| 236 LocaleObserver::Delegate* delegate, | 244 LocaleObserver::Delegate* delegate, |
| 237 const std::string& cur_locale, | 245 const std::string& cur_locale, |
| 238 const std::string& from_locale, | 246 const std::string& from_locale, |
| 239 const std::string& to_locale) { | 247 const std::string& to_locale) { |
| 240 FOR_EACH_OBSERVER( | 248 FOR_EACH_OBSERVER( |
| 241 LocaleObserver, | 249 LocaleObserver, |
| 242 locale_observers_, | 250 locale_observers_, |
| 243 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale)); | 251 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale)); |
| 244 } | 252 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 } | 315 } |
| 308 | 316 |
| 309 void SystemTrayNotifier::NotifyScreenShareStop() { | 317 void SystemTrayNotifier::NotifyScreenShareStop() { |
| 310 FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_, | 318 FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_, |
| 311 OnScreenShareStop()); | 319 OnScreenShareStop()); |
| 312 } | 320 } |
| 313 | 321 |
| 314 #endif // OS_CHROMEOS | 322 #endif // OS_CHROMEOS |
| 315 | 323 |
| 316 } // namespace ash | 324 } // namespace ash |
| OLD | NEW |