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

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: Created 5 years 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON)); 75 IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON));
76 localized_strings->SetString("extensionImeLable", 76 localized_strings->SetString("extensionImeLable",
77 l10n_util::GetStringUTF16( 77 l10n_util::GetStringUTF16(
78 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME)); 78 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME));
79 localized_strings->SetString("extensionImeDescription", 79 localized_strings->SetString("extensionImeDescription",
80 l10n_util::GetStringUTF16( 80 l10n_util::GetStringUTF16(
81 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION)); 81 IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION));
82 localized_strings->SetString("noInputMethods", 82 localized_strings->SetString("noInputMethods",
83 l10n_util::GetStringUTF16( 83 l10n_util::GetStringUTF16(
84 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS)); 84 IDS_OPTIONS_SETTINGS_LANGUAGES_NO_INPUT_METHODS));
85 localized_strings->SetString(
86 "activateSystemImeMenu",
87 l10n_util::GetStringUTF16(
88 IDS_OPTIONS_SETTINGS_LANGUAGES_ACTIVATE_SYSTEM_IME_MENU));
85 89
86 // GetSupportedInputMethods() never returns NULL. 90 // GetSupportedInputMethods() never returns NULL.
87 localized_strings->Set("languageList", GetAcceptLanguageList().release()); 91 localized_strings->Set("languageList", GetAcceptLanguageList().release());
88 localized_strings->Set("inputMethodList", GetInputMethodList()); 92 localized_strings->Set("inputMethodList", GetInputMethodList());
89 93
90 input_method::InputMethodManager* manager = 94 input_method::InputMethodManager* manager =
91 input_method::InputMethodManager::Get(); 95 input_method::InputMethodManager::Get();
92 input_method::InputMethodDescriptors ext_ime_descriptors; 96 input_method::InputMethodDescriptors ext_ime_descriptors;
93 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors); 97 manager->GetActiveIMEState()->GetInputMethodExtensions(&ext_ime_descriptors);
94 98
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id); 264 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id);
261 const extensions::Extension* extension = 265 const extensions::Extension* extension =
262 enabled_extensions.GetByID(extension_id); 266 enabled_extensions.GetByID(extension_id);
263 if (extension) 267 if (extension)
264 entry->SetString("extensionName", extension->name()); 268 entry->SetString("extensionName", extension->name());
265 } 269 }
266 } 270 }
267 271
268 } // namespace options 272 } // namespace options
269 } // namespace chromeos 273 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698