Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / webui / options / language_options_handler.h
blobe83e9fc1b0b6047e88f4482272b13fc32d13bbb9
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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_
8 #include "chrome/browser/ui/webui/options/language_options_handler_common.h"
10 namespace options {
12 // Language options UI page handler for non-Chrome OS platforms. For Chrome OS,
13 // see chromeos::CrosLanguageOptionsHandler.
14 class LanguageOptionsHandler : public LanguageOptionsHandlerCommon {
15 public:
16 LanguageOptionsHandler();
17 ~LanguageOptionsHandler() override;
19 // OptionsPageUIHandler implementation.
20 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
22 // WebUIMessageHandler implementation.
23 void RegisterMessages() override;
25 // The following static method is public for ease of testing.
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();
33 private:
34 // LanguageOptionsHandlerCommon implementation.
35 base::string16 GetProductName() override;
36 void SetApplicationLocale(const std::string& language_code) override;
38 // Called when the restart button is clicked.
39 void RestartCallback(const base::ListValue* args);
41 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler);
44 } // namespace options
46 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_H_