Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc

Issue 1523593002: Add an option in language settings for activating the IME menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add enable-ime-menu flag Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h" 5 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON)); 77 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON));
78 localized_strings->SetString("extensionImeLable", 78 localized_strings->SetString("extensionImeLable",
79 l10n_util::GetStringUTF16( 79 l10n_util::GetStringUTF16(
80 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME)); 80 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME));
81 localized_strings->SetString("extensionImeDescription", 81 localized_strings->SetString("extensionImeDescription",
82 l10n_util::GetStringUTF16( 82 l10n_util::GetStringUTF16(
83 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION)); 83 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION));
84 localized_strings->SetString("noInputMethods", 84 localized_strings->SetString("noInputMethods",
85 l10n_util::GetStringUTF16( 85 l10n_util::GetStringUTF16(
86 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS)); 86 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS));
87 localized_strings->SetString(
88 "activateImeMenu", l10n_util::GetStringUTF16(
michaelpg 2016/01/04 16:37:36 nit: use consistent formatting with the above line
Azure Wei 2016/01/05 06:48:03 Done.
89 IDS_OPTIONS_SETTINGS_LANGUAGES_ACTIVATE_IME_MENU));
90 localized_strings->SetString(
91 "activateImeMenuDesc",
92 l10n_util::GetStringUTF16(
93 IDS_OPTIONS_SETTINGS_LANGUAGES_ACTIVATE_IME_MENU_DESCRIPTION));
87 94
88 // GetSupportedInputMethods() never returns NULL. 95 // GetSupportedInputMethods() never returns NULL.
89 localized_strings->Set("languageList", GetAcceptLanguageList().release()); 96 localized_strings->Set("languageList", GetAcceptLanguageList().release());
90 localized_strings->Set("inputMethodList", GetInputMethodList()); 97 localized_strings->Set("inputMethodList", GetInputMethodList());
91 98
92 input_method::InputMethodManager* manager = 99 input_method::InputMethodManager* manager =
93 input_method::InputMethodManager::Get(); 100 input_method::InputMethodManager::Get();
94 input_method::InputMethodDescriptors ext_ime_descriptors; 101 input_method::InputMethodDescriptors ext_ime_descriptors;
95 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors); 102 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors);
96 103
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id); 269 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id);
263 const extensions::Extension* extension = 270 const extensions::Extension* extension =
264 enabled_extensions.GetByID(extension_id); 271 enabled_extensions.GetByID(extension_id);
265 if (extension) 272 if (extension)
266 entry->SetString("extensionName", extension->name()); 273 entry->SetString("extensionName", extension->name());
267 } 274 }
268 } 275 }
269 276
270 } // namespace options 277 } // namespace options
271 } // namespace chromeos 278 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698