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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_welcome.js

Issue 2735823004: ChromeOS OOBE: OOBE should listen to notification of keyboard layout update. (Closed)
Patch Set: Created 3 years, 9 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/resources/chromeos/login/oobe_screen_network.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/oobe_welcome.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome.js b/chrome/browser/resources/chromeos/login/oobe_welcome.js
index 68a45a1e8e39edb4d7a01c81e341604e95b6fd9d..0c6945132237ec4723ca30d6d8e21b9daf33ed68 100644
--- a/chrome/browser/resources/chromeos/login/oobe_welcome.js
+++ b/chrome/browser/resources/chromeos/login/oobe_welcome.js
@@ -404,6 +404,24 @@ Polymer({
this.currentLanguage = Oobe.getSelectedTitle(this.languages);
},
+ setSelectedKeyboard: function(keyboard_id) {
+ var found = false;
+ for (var i = 0; i < this.keyboards.length; ++i) {
+ if (this.keyboards[i].value != keyboard_id) {
+ this.keyboards[i].selected = false;
+ continue;
+ }
+ this.keyboards[i].selected = true;
+ found = true;
+ }
+ if (!found)
+ return;
+
+ // Force i18n-dropdown to refresh.
+ this.keyboards = this.keyboards.slice();
+ this.onKeyboardsChanged_();
+ },
+
onKeyboardsChanged_: function() {
this.currentKeyboard = Oobe.getSelectedTitle(this.keyboards);
},
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe_screen_network.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698