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_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/ui/webui/options/language_options_handler_common.h" | |
10 | |
11 // Language options UI page handler for non-Chrome OS platforms. For Chrome OS, | |
12 // see chromeos::CrosLanguageOptionsHandler. | |
13 class LanguageOptionsHandler : public LanguageOptionsHandlerCommon { | |
14 public: | |
15 LanguageOptionsHandler(); | |
16 virtual ~LanguageOptionsHandler(); | |
17 | |
18 // OptionsPageUIHandler implementation. | |
19 virtual void GetLocalizedValues( | |
20 base::DictionaryValue* localized_strings) OVERRIDE; | |
21 | |
22 // WebUIMessageHandler implementation. | |
23 virtual void RegisterMessages() OVERRIDE; | |
24 | |
25 // The following static method is public for ease of testing. | |
26 | |
27 // Gets the list of languages from the given input descriptors. | |
28 // The return value will look like: | |
29 // [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'}, | |
30 // ...] | |
31 static base::ListValue* GetLanguageList(); | |
32 | |
33 private: | |
34 // LanguageOptionsHandlerCommon implementation. | |
35 virtual string16 GetProductName() OVERRIDE; | |
36 virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; | |
37 | |
38 // Called when the restart button is clicked. | |
39 void RestartCallback(const base::ListValue* args); | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler); | |
42 }; | |
43 | |
44 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_ | |
OLD | NEW |