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

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: Fix test failure. 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON)); 78 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON));
79 localized_strings->SetString("extensionImeLable", 79 localized_strings->SetString("extensionImeLable",
80 l10n_util::GetStringUTF16( 80 l10n_util::GetStringUTF16(
81 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME)); 81 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME));
82 localized_strings->SetString("extensionImeDescription", 82 localized_strings->SetString("extensionImeDescription",
83 l10n_util::GetStringUTF16( 83 l10n_util::GetStringUTF16(
84 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION)); 84 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION));
85 localized_strings->SetString("noInputMethods", 85 localized_strings->SetString("noInputMethods",
86 l10n_util::GetStringUTF16( 86 l10n_util::GetStringUTF16(
87 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS)); 87 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS));
88 localized_strings->SetString("activateImeMenu",
89 l10n_util::GetStringUTF16(
90 IDS_OPTIONS_SETTINGS_LANGUAGES_ACTIVATE_IME_MENU));
91 localized_strings->SetString("activateImeMenuDesc",
92 l10n_util::GetStringUTF16(
93 IDS_OPTIONS_SETTINGS_LANGUAGES_ACTIVATE_IME_MENU_DESCRIPTION));
88 94
89 // GetSupportedInputMethods() never returns NULL. 95 // GetSupportedInputMethods() never returns NULL.
90 localized_strings->Set("languageList", GetAcceptLanguageList().release()); 96 localized_strings->Set("languageList", GetAcceptLanguageList().release());
91 localized_strings->Set("inputMethodList", GetInputMethodList()); 97 localized_strings->Set("inputMethodList", GetInputMethodList());
92 98
93 input_method::InputMethodManager* manager = 99 input_method::InputMethodManager* manager =
94 input_method::InputMethodManager::Get(); 100 input_method::InputMethodManager::Get();
95 input_method::InputMethodDescriptors ext_ime_descriptors; 101 input_method::InputMethodDescriptors ext_ime_descriptors;
96 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors); 102 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors);
97 103
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id); 269 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id);
264 const extensions::Extension* extension = 270 const extensions::Extension* extension =
265 enabled_extensions.GetByID(extension_id); 271 enabled_extensions.GetByID(extension_id);
266 if (extension) 272 if (extension)
267 entry->SetString("extensionName", extension->name()); 273 entry->SetString("extensionName", extension->name());
268 } 274 }
269 } 275 }
270 276
271 } // namespace options 277 } // namespace options
272 } // namespace chromeos 278 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698