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

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

Issue 133273032: Guest Mode: input method should default to the underlying latin keyboard layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Use EnableInputMethod instead of EnableInputMethods. Created 6 years, 10 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/chromeos/login/network_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/network_screen_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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return; 201 return;
202 202
203 base::WeakPtr<NetworkScreenHandler> weak_self = 203 base::WeakPtr<NetworkScreenHandler> weak_self =
204 weak_ptr_factory_.GetWeakPtr(); 204 weak_ptr_factory_.GetWeakPtr();
205 scoped_ptr<NetworkScreenHandlerOnLanguageChangedCallbackData> callback_data( 205 scoped_ptr<NetworkScreenHandlerOnLanguageChangedCallbackData> callback_data(
206 new NetworkScreenHandlerOnLanguageChangedCallbackData(weak_self)); 206 new NetworkScreenHandlerOnLanguageChangedCallbackData(weak_self));
207 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 207 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
208 new locale_util::SwitchLanguageCallback( 208 new locale_util::SwitchLanguageCallback(
209 base::Bind(&NetworkScreenHandler::OnLanguageChangedCallback, 209 base::Bind(&NetworkScreenHandler::OnLanguageChangedCallback,
210 base::Passed(callback_data.Pass())))); 210 base::Passed(callback_data.Pass()))));
211 locale_util::SwitchLanguage(locale, true, callback.Pass()); 211 locale_util::SwitchLanguage(locale,
212 true /* enableLocaleKeyboardLayouts */,
213 true /* login_layouts_only */,
214 callback.Pass());
212 } 215 }
213 216
214 void NetworkScreenHandler::HandleOnInputMethodChanged(const std::string& id) { 217 void NetworkScreenHandler::HandleOnInputMethodChanged(const std::string& id) {
215 input_method::InputMethodManager::Get()->ChangeInputMethod(id); 218 input_method::InputMethodManager::Get()->ChangeInputMethod(id);
216 } 219 }
217 220
218 void NetworkScreenHandler::HandleOnTimezoneChanged( 221 void NetworkScreenHandler::HandleOnTimezoneChanged(
219 const std::string& timezone_id) { 222 const std::string& timezone_id) {
220 std::string current_timezone_id; 223 std::string current_timezone_id;
221 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id); 224 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 timezone_option->SetString("value", timezone_id); 313 timezone_option->SetString("value", timezone_id);
311 timezone_option->SetString("title", timezone_name); 314 timezone_option->SetString("title", timezone_name);
312 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id); 315 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id);
313 timezone_list->Append(timezone_option.release()); 316 timezone_list->Append(timezone_option.release());
314 } 317 }
315 318
316 return timezone_list.release(); 319 return timezone_list.release();
317 } 320 }
318 321
319 } // namespace chromeos 322 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller_browsertest.cc ('k') | chromeos/ime/input_method_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698