| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_SETTINGS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/callback_old.h" |
| 12 #include "content/browser/cancelable_request.h" |
| 13 #include "unicode/timezone.h" |
| 14 |
| 15 namespace chromeos { |
| 16 namespace system { |
| 17 |
| 18 // This interface provides access to Chrome OS timezone settings. |
| 19 class TimezoneSettings : public CancelableRequestProvider { |
| 20 public: |
| 21 class Observer { |
| 22 public: |
| 23 // Called when the timezone has changed. |timezone| is non-null. |
| 24 virtual void TimezoneChanged(const icu::TimeZone& timezone) = 0; |
| 25 }; |
| 26 |
| 27 static TimezoneSettings* GetInstance(); |
| 28 |
| 29 // Returns the current timezone as an icu::Timezone object. |
| 30 virtual const icu::TimeZone& GetTimezone() = 0; |
| 31 |
| 32 // Sets the current timezone. |timezone| must be non-null. |
| 33 virtual void SetTimezone(const icu::TimeZone& timezone) = 0; |
| 34 |
| 35 virtual void AddObserver(Observer* observer) = 0; |
| 36 virtual void RemoveObserver(Observer* observer) = 0; |
| 37 |
| 38 protected: |
| 39 virtual ~TimezoneSettings() {} |
| 40 }; |
| 41 |
| 42 } // namespace system |
| 43 } // namespace chromeos |
| 44 |
| 45 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_TIMEZONE_SETTINGS_H_ |
| OLD | NEW |