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 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include "ash/system/chromeos/network/network_state_notifier.h" | 8 #include "ash/system/chromeos/network/network_state_notifier.h" |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 void SystemTrayNotifier::AddClockObserver(ClockObserver* observer) { | 48 void SystemTrayNotifier::AddClockObserver(ClockObserver* observer) { |
49 clock_observers_.AddObserver(observer); | 49 clock_observers_.AddObserver(observer); |
50 } | 50 } |
51 | 51 |
52 void SystemTrayNotifier::RemoveClockObserver(ClockObserver* observer) { | 52 void SystemTrayNotifier::RemoveClockObserver(ClockObserver* observer) { |
53 clock_observers_.RemoveObserver(observer); | 53 clock_observers_.RemoveObserver(observer); |
54 } | 54 } |
55 | 55 |
56 void SystemTrayNotifier::AddDriveObserver(DriveObserver* observer) { | |
57 drive_observers_.AddObserver(observer); | |
58 } | |
59 | |
60 void SystemTrayNotifier::RemoveDriveObserver(DriveObserver* observer) { | |
61 drive_observers_.RemoveObserver(observer); | |
62 } | |
63 | |
64 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) { | 56 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) { |
65 ime_observers_.AddObserver(observer); | 57 ime_observers_.AddObserver(observer); |
66 } | 58 } |
67 | 59 |
68 void SystemTrayNotifier::RemoveIMEObserver(IMEObserver* observer) { | 60 void SystemTrayNotifier::RemoveIMEObserver(IMEObserver* observer) { |
69 ime_observers_.RemoveObserver(observer); | 61 ime_observers_.RemoveObserver(observer); |
70 } | 62 } |
71 | 63 |
72 void SystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) { | 64 void SystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) { |
73 locale_observers_.AddObserver(observer); | 65 locale_observers_.AddObserver(observer); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 clock_observers_, | 261 clock_observers_, |
270 OnSystemClockTimeUpdated()); | 262 OnSystemClockTimeUpdated()); |
271 } | 263 } |
272 | 264 |
273 void SystemTrayNotifier::NotifySystemClockCanSetTimeChanged(bool can_set_time) { | 265 void SystemTrayNotifier::NotifySystemClockCanSetTimeChanged(bool can_set_time) { |
274 FOR_EACH_OBSERVER(ClockObserver, | 266 FOR_EACH_OBSERVER(ClockObserver, |
275 clock_observers_, | 267 clock_observers_, |
276 OnSystemClockCanSetTimeChanged(can_set_time)); | 268 OnSystemClockCanSetTimeChanged(can_set_time)); |
277 } | 269 } |
278 | 270 |
279 void SystemTrayNotifier::NotifyDriveJobUpdated( | |
280 const DriveOperationStatus& status) { | |
281 FOR_EACH_OBSERVER(DriveObserver, | |
282 drive_observers_, | |
283 OnDriveJobUpdated(status)); | |
284 } | |
285 | |
286 void SystemTrayNotifier::NotifyRefreshIME() { | 271 void SystemTrayNotifier::NotifyRefreshIME() { |
287 FOR_EACH_OBSERVER(IMEObserver, | 272 FOR_EACH_OBSERVER(IMEObserver, |
288 ime_observers_, | 273 ime_observers_, |
289 OnIMERefresh()); | 274 OnIMERefresh()); |
290 } | 275 } |
291 | 276 |
292 void SystemTrayNotifier::NotifyLocaleChanged( | 277 void SystemTrayNotifier::NotifyLocaleChanged( |
293 LocaleObserver::Delegate* delegate, | 278 LocaleObserver::Delegate* delegate, |
294 const std::string& cur_locale, | 279 const std::string& cur_locale, |
295 const std::string& from_locale, | 280 const std::string& from_locale, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 380 |
396 void SystemTrayNotifier::NotifyLastWindowClosed() { | 381 void SystemTrayNotifier::NotifyLastWindowClosed() { |
397 FOR_EACH_OBSERVER(LastWindowClosedObserver, | 382 FOR_EACH_OBSERVER(LastWindowClosedObserver, |
398 last_window_closed_observers_, | 383 last_window_closed_observers_, |
399 OnLastWindowClosed()); | 384 OnLastWindowClosed()); |
400 } | 385 } |
401 | 386 |
402 #endif // OS_CHROMEOS | 387 #endif // OS_CHROMEOS |
403 | 388 |
404 } // namespace ash | 389 } // namespace ash |
OLD | NEW |