| OLD | NEW |
| (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 #include "chrome/browser/chromeos/status/clock_updater.h" | |
| 6 | |
| 7 #include "chrome/browser/chromeos/status/clock_menu_button.h" | |
| 8 #include "chrome/browser/chromeos/system/timezone_settings.h" | |
| 9 #include "chromeos/dbus/dbus_thread_manager.h" | |
| 10 | |
| 11 ClockUpdater::ClockUpdater(ClockMenuButton* button) | |
| 12 : button_(button) { | |
| 13 chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this); | |
| 14 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | |
| 15 AddObserver(this); | |
| 16 } | |
| 17 | |
| 18 ClockUpdater::~ClockUpdater() { | |
| 19 chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this); | |
| 20 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | |
| 21 RemoveObserver(this); | |
| 22 } | |
| 23 | |
| 24 void ClockUpdater::TimezoneChanged(const icu::TimeZone& timezone) { | |
| 25 button_->UpdateText(); | |
| 26 } | |
| 27 | |
| 28 void ClockUpdater::SystemResumed() { | |
| 29 button_->UpdateText(); | |
| 30 } | |
| OLD | NEW |