OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/browser/dom_ui/options_ui.h" | 11 #include "chrome/browser/dom_ui/options_ui.h" |
12 #include "third_party/icu/public/i18n/unicode/timezone.h" | 12 #include "third_party/icu/public/i18n/unicode/timezone.h" |
13 | 13 |
14 // ChromeOS system options page UI handler. | 14 // ChromeOS system options page UI handler. |
15 class SystemOptionsHandler : public OptionsPageUIHandler { | 15 class SystemOptionsHandler : public OptionsPageUIHandler { |
16 public: | 16 public: |
17 SystemOptionsHandler(); | 17 SystemOptionsHandler(); |
18 virtual ~SystemOptionsHandler(); | 18 virtual ~SystemOptionsHandler(); |
19 | 19 |
20 // OptionsUIHandler implementation. | 20 // OptionsUIHandler implementation. |
21 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 21 virtual void GetLocalizedValues(DictionaryValue* localized_strings); |
22 | 22 |
23 private: | 23 private: |
24 // Creates the map of timezones used by the options page. | 24 // Creates the map of timezones used by the options page. |
25 DictionaryValue* GetTimezoneMap(); | 25 ListValue* GetTimezoneList(); |
26 | 26 |
27 // Gets timezone name. | 27 // Gets timezone name. |
28 std::string GetTimezoneName(const icu::TimeZone* timezone); | 28 std::wstring GetTimezoneName(const icu::TimeZone* timezone); |
29 | 29 |
30 // Gets timezone ID which is also used as timezone pref value. | 30 // Gets timezone ID which is also used as timezone pref value. |
31 std::wstring GetTimezoneID(const icu::TimeZone* timezone); | 31 std::wstring GetTimezoneID(const icu::TimeZone* timezone); |
32 | 32 |
33 // Timezones. | 33 // Timezones. |
34 std::vector<icu::TimeZone*> timezones_; | 34 std::vector<icu::TimeZone*> timezones_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler); | 36 DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler); |
37 }; | 37 }; |
38 | 38 |
39 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ | 39 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_OPTIONS_HANDLER_H_ |
OLD | NEW |