| 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_LANGUAGE_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/dom_ui/options_ui.h" | 9 #include "chrome/browser/dom_ui/options_ui.h" |
| 10 | 10 |
| 11 class DictionaryValue; | 11 class DictionaryValue; |
| 12 class ListValue; | 12 class ListValue; |
| 13 | 13 |
| 14 // ChromeOS language options page UI handler. | 14 // ChromeOS language options page UI handler. |
| 15 class LanguageOptionsHandler : public OptionsPageUIHandler { | 15 class LanguageOptionsHandler : public OptionsPageUIHandler { |
| 16 public: | 16 public: |
| 17 LanguageOptionsHandler(); | 17 LanguageOptionsHandler(); |
| 18 virtual ~LanguageOptionsHandler(); | 18 virtual ~LanguageOptionsHandler(); |
| 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 // DOMMessageHandler implementation. |
| 24 virtual void RegisterMessages(); |
| 25 |
| 23 private: | 26 private: |
| 24 // Get the list of input methods. | 27 // Gets the list of input methods. The return value will look like: |
| 28 // [{'id': 'pinyin', 'displayName': 'Pinyin', 'languageCode': 'zh-CW'}, ...] |
| 25 ListValue* GetInputMethodList(); | 29 ListValue* GetInputMethodList(); |
| 26 | 30 |
| 27 // Get the list of languages. | 31 // Gets the list of languages. The return value will look like: |
| 32 // [{'code': 'fr', 'displayName': 'French'}, ...] |
| 28 ListValue* GetLanguageList(); | 33 ListValue* GetLanguageList(); |
| 29 | 34 |
| 35 // Called when the UI language is changed. |
| 36 // |value| will be the language code as string (ex. "fr"). |
| 37 void UiLanguageChangeCallback(const Value* value); |
| 38 |
| 30 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler); | 39 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler); |
| 31 }; | 40 }; |
| 32 | 41 |
| 33 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ |
| OLD | NEW |