Mojo api for requesting keyboard layouts for public account user.
The requested keyboard layouts will be used in public session UI to
populate a selection menu. (In a follow-up CL)
Bug: 809635
Change-Id: I1154647d4bfdf3637ec37033f4452742c71ec377
Reviewed-on: https://chromium-review.googlesource.com/1020664
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Xiaoyin Hu <xiaoyinh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554517}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index ac2162ca..016c0d2 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -221,6 +221,14 @@
login_screen_client_->LaunchPublicSession(account_id, locale, input_method);
}
+void LoginScreenController::RequestPublicSessionKeyboardLayouts(
+ const AccountId& account_id,
+ const std::string& locale) {
+ if (!login_screen_client_)
+ return;
+ login_screen_client_->RequestPublicSessionKeyboardLayouts(account_id, locale);
+}
+
void LoginScreenController::AddObserver(
LoginScreenControllerObserver* observer) {
observers_.AddObserver(observer);
@@ -361,6 +369,16 @@
}
}
+void LoginScreenController::SetPublicSessionKeyboardLayouts(
+ const AccountId& account_id,
+ const std::string& locale,
+ std::vector<mojom::InputMethodItemPtr> keyboard_layouts) {
+ if (DataDispatcher()) {
+ DataDispatcher()->SetPublicSessionKeyboardLayouts(account_id, locale,
+ keyboard_layouts);
+ }
+}
+
void LoginScreenController::DoAuthenticateUser(const AccountId& account_id,
const std::string& password,
bool authenticated_by_pin,