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

Unified Diff: chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc

Issue 309623005: Remove the flag g_use_wrapped_extension_keyboard_layouts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/oobe_localization_browsertest.cc ('k') | chromeos/ime/extension_ime_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
index 15939c5927f059e6eb7457b5c947839c96fc7649..e19d54735db437ce54bdfabd7a45944d473c0a62 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -53,8 +53,6 @@ const char kJsApiNetworkOnLanguageChanged[] = "networkOnLanguageChanged";
const char kJsApiNetworkOnInputMethodChanged[] = "networkOnInputMethodChanged";
const char kJsApiNetworkOnTimezoneChanged[] = "networkOnTimezoneChanged";
-const char kUSLayout[] = "xkb:us::eng";
-
const int kDerelectDetectionTimeoutSeconds = 8 * 60 * 60; // 8 hours.
const int kDerelectIdleTimeoutSeconds = 5 * 60; // 5 minutes.
const int kOobeTimerUpdateIntervalSeconds = 5 * 60; // 5 minutes.
@@ -450,12 +448,8 @@ base::ListValue* NetworkScreenHandler::GetLanguageList() {
ComponentExtensionIMEManager* comp_manager =
manager->GetComponentExtensionIMEManager();
input_method::InputMethodDescriptors descriptors;
- if (extension_ime_util::UseWrappedExtensionKeyboardLayouts()) {
- if (comp_manager->IsInitialized())
- descriptors = comp_manager->GetXkbIMEAsInputMethodDescriptor();
- } else {
- descriptors = *(manager->GetSupportedInputMethods());
- }
+ if (comp_manager->IsInitialized())
+ descriptors = comp_manager->GetXkbIMEAsInputMethodDescriptor();
base::ListValue* languages_list =
options::CrosLanguageOptionsHandler::GetUILanguageList(descriptors);
for (size_t i = 0; i < languages_list->GetSize(); ++i) {
@@ -538,16 +532,14 @@ base::ListValue* NetworkScreenHandler::GetInputMethods() {
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
input_method::InputMethodUtil* util = manager->GetInputMethodUtil();
- if (extension_ime_util::UseWrappedExtensionKeyboardLayouts()) {
- ComponentExtensionIMEManager* comp_manager =
- manager->GetComponentExtensionIMEManager();
- if (!comp_manager->IsInitialized()) {
- input_method::InputMethodDescriptor fallback =
- util->GetFallbackInputMethodDescriptor();
- input_methods_list->Append(
- CreateInputMethodsEntry(fallback, fallback.id()));
- return input_methods_list;
- }
+ ComponentExtensionIMEManager* comp_manager =
+ manager->GetComponentExtensionIMEManager();
+ if (!comp_manager->IsInitialized()) {
+ input_method::InputMethodDescriptor fallback =
+ util->GetFallbackInputMethodDescriptor();
+ input_methods_list->Append(
+ CreateInputMethodsEntry(fallback, fallback.id()));
+ return input_methods_list;
}
const std::vector<std::string>& hardware_login_input_methods =
@@ -590,8 +582,8 @@ base::ListValue* NetworkScreenHandler::GetInputMethods() {
CreateInputMethodsEntry((*input_methods)[i], current_input_method_id));
}
// "xkb:us::eng" should always be in the list of available layouts.
- const std::string& us_keyboard_id =
- extension_ime_util::GetInputMethodIDByKeyboardLayout(kUSLayout);
+ const std::string us_keyboard_id =
+ util->GetFallbackInputMethodDescriptor().id();
if (input_methods_added.find(us_keyboard_id) == input_methods_added.end()) {
const input_method::InputMethodDescriptor* us_eng_descriptor =
util->GetInputMethodDescriptorFromId(us_keyboard_id);
« no previous file with comments | « chrome/browser/chromeos/login/oobe_localization_browsertest.cc ('k') | chromeos/ime/extension_ime_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698