| Index: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
|
| index 5c44ddbb946b32d65b90aef7794797731c6ff2f3..2300fc1fad81b82a14ead8fd6f85da64518d70e0 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
|
| @@ -67,6 +67,12 @@ void CrosLanguageOptionsHandler::GetLocalizedValues(
|
| localized_strings->SetString("restart_button",
|
| l10n_util::GetStringUTF16(
|
| IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON));
|
| + localized_strings->SetString("extension_ime_label",
|
| + l10n_util::GetStringUTF16(
|
| + IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME));
|
| + localized_strings->SetString("extension_ime_description",
|
| + l10n_util::GetStringUTF16(
|
| + IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION));
|
|
|
| input_method::InputMethodManager* manager =
|
| input_method::InputMethodManager::GetInstance();
|
| @@ -75,6 +81,7 @@ void CrosLanguageOptionsHandler::GetLocalizedValues(
|
| manager->GetSupportedInputMethods());
|
| localized_strings->Set("languageList", GetLanguageList(*descriptors));
|
| localized_strings->Set("inputMethodList", GetInputMethodList(*descriptors));
|
| + localized_strings->Set("extensionImeList", GetExtensionImeList());
|
| }
|
|
|
| void CrosLanguageOptionsHandler::RegisterMessages() {
|
| @@ -193,7 +200,7 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageList(
|
|
|
| const LanguagePair& pair = language_map[display_names[i]];
|
| DictionaryValue* dictionary = new DictionaryValue();
|
| - dictionary->SetString("code", pair.first);
|
| + dictionary->SetString("code", pair.first);
|
| dictionary->SetString("displayName", display_names[i]);
|
| dictionary->SetString("textDirection", directionality);
|
| dictionary->SetString("nativeDisplayName", pair.second);
|
| @@ -203,6 +210,26 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageList(
|
| return language_list;
|
| }
|
|
|
| +base::ListValue* CrosLanguageOptionsHandler::GetExtensionImeList() {
|
| + input_method::InputMethodManager* manager =
|
| + input_method::InputMethodManager::GetInstance();
|
| +
|
| + scoped_ptr<input_method::InputMethodDescriptors> descriptors(
|
| + manager->GetInputMethodExtensions());
|
| +
|
| + ListValue* extension_ime_ids_list = new ListValue();
|
| +
|
| + for (size_t i = 0; i < descriptors->size(); ++i) {
|
| + const input_method::InputMethodDescriptor& descriptor = (*descriptors)[i];
|
| + DictionaryValue* dictionary = new DictionaryValue();
|
| + dictionary->SetString("id", descriptor.id());
|
| + dictionary->SetString("displayName", descriptor.name());
|
| + extension_ime_ids_list->Append(dictionary);
|
| + }
|
| +
|
| + return extension_ime_ids_list;
|
| +}
|
| +
|
| string16 CrosLanguageOptionsHandler::GetProductName() {
|
| return l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME);
|
| }
|
|
|