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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview Polymer element for displaying material design OOBE. 6 * @fileoverview Polymer element for displaying material design OOBE.
7 */ 7 */
8 8
9 Polymer({ 9 Polymer({
10 is: 'oobe-welcome-md', 10 is: 'oobe-welcome-md',
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 var item = event.detail; 397 var item = event.detail;
398 var inputMethodId = item.value; 398 var inputMethodId = item.value;
399 this.currentKeyboard = item.title; 399 this.currentKeyboard = item.title;
400 this.screen.onKeyboardSelected_(inputMethodId); 400 this.screen.onKeyboardSelected_(inputMethodId);
401 }, 401 },
402 402
403 onLanguagesChanged_: function() { 403 onLanguagesChanged_: function() {
404 this.currentLanguage = Oobe.getSelectedTitle(this.languages); 404 this.currentLanguage = Oobe.getSelectedTitle(this.languages);
405 }, 405 },
406 406
407 setSelectedKeyboard: function(keyboard_id) {
408 var found = false;
409 for (var i = 0; i < this.keyboards.length; ++i) {
410 if (this.keyboards[i].value != keyboard_id) {
411 this.keyboards[i].selected = false;
412 continue;
413 }
414 this.keyboards[i].selected = true;
415 found = true;
416 }
417 if (!found)
418 return;
419
420 // Force i18n-dropdown to refresh.
421 this.keyboards = this.keyboards.slice();
422 this.onKeyboardsChanged_();
423 },
424
407 onKeyboardsChanged_: function() { 425 onKeyboardsChanged_: function() {
408 this.currentKeyboard = Oobe.getSelectedTitle(this.keyboards); 426 this.currentKeyboard = Oobe.getSelectedTitle(this.keyboards);
409 }, 427 },
410 428
411 /** 429 /**
412 * Handle "OK" button for "LanguageSelection" screen. 430 * Handle "OK" button for "LanguageSelection" screen.
413 * 431 *
414 * @private 432 * @private
415 */ 433 */
416 closeLanguageSection_: function() { 434 closeLanguageSection_: function() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 * @private 477 * @private
460 */ 478 */
461 onTimezoneSelected_: function(event) { 479 onTimezoneSelected_: function(event) {
462 var item = event.detail; 480 var item = event.detail;
463 if (!item) 481 if (!item)
464 return; 482 return;
465 483
466 this.screen.onTimezoneSelected_(item.value); 484 this.screen.onTimezoneSelected_(item.value);
467 }, 485 },
468 }); 486 });
OLDNEW
« 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