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

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

Issue 398543002: Add language and keyboard layout pickers to public session pods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Base the list of keyboard layouts offered on the resolved locale, not the selected locale. Created 6 years, 5 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/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 88063e8506f66ea8f10864a413e294016166cbad..00c0f38fb2aa06e7560d3c07e3803bfbff85c8ad 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#include "chrome/browser/chromeos/policy/device_local_account.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h"
@@ -46,6 +47,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.h"
#include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
#include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h"
#include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
@@ -54,6 +56,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/ime/ime_keyboard.h"
+#include "chromeos/ime/input_method_descriptor.h"
#include "chromeos/ime/input_method_manager.h"
#include "chromeos/login/auth/key.h"
#include "chromeos/login/auth/user_context.h"
@@ -357,9 +360,13 @@ void SigninScreenHandler::DeclareLocalizedValues(
builder->Add("publicAccountInfoFormat", IDS_LOGIN_PUBLIC_ACCOUNT_INFO_FORMAT);
builder->Add("publicAccountReminder",
IDS_LOGIN_PUBLIC_ACCOUNT_SIGNOUT_REMINDER);
+ builder->Add("publicSessionLanguageAndInput",
+ IDS_LOGIN_PUBLIC_SESSION_LANGUAGE_AND_INPUT);
builder->Add("publicAccountEnter", IDS_LOGIN_PUBLIC_ACCOUNT_ENTER);
builder->Add("publicAccountEnterAccessibleName",
IDS_LOGIN_PUBLIC_ACCOUNT_ENTER_ACCESSIBLE_NAME);
+ builder->Add("publicSessionSelectLanguage", IDS_LANGUAGE_SELECTION_SELECT);
+ builder->Add("publicSessionSelectKeyboard", IDS_KEYBOARD_SELECTION_SELECT);
builder->Add("removeUserWarningText",
base::string16());
builder->AddF("removeSupervisedUserWarningText",
@@ -715,6 +722,9 @@ void SigninScreenHandler::RegisterMessages() {
AddCallback("focusPod", &SigninScreenHandler::HandleFocusPod);
AddCallback("retrieveAuthenticatedUserEmail",
&SigninScreenHandler::HandleRetrieveAuthenticatedUserEmail);
+ AddCallback("getPublicSessionKeyboardLayouts",
+ &SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts);
+
// This message is sent by the kiosk app menu, but is handled here
// so we can tell the delegate to launch the app.
@@ -1251,6 +1261,15 @@ void SigninScreenHandler::HandleRetrieveAuthenticatedUserEmail(
Profile::FromWebUI(web_ui())->GetRequestContext()));
}
+void SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts(
+ const std::string& user_id,
+ const std::string& locale) {
+ web_ui()->CallJavascriptFunction(
+ "login.AccountPickerScreen.setPublicSessionKeyboardLayouts",
+ base::StringValue(user_id),
+ *GetKeyboardLayoutsForLocale(locale).release());
+}
+
void SigninScreenHandler::HandleLaunchKioskApp(const std::string& app_id,
bool diagnostic_mode) {
UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_id);
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698