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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 2189733006: ChromeOS: Implement Language Selection screen of material design OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 4 years, 4 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 /** 5 /**
6 * @fileoverview Out of the box experience flow (OOBE). 6 * @fileoverview Out of the box experience flow (OOBE).
7 * This is the main code for the OOBE WebUI implementation. 7 * This is the main code for the OOBE WebUI implementation.
8 */ 8 */
9 9
10 <include src="login_shared.js"> 10 <include src="login_shared.js">
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 // Reload global local strings, process DOM tree again. 298 // Reload global local strings, process DOM tree again.
299 loadTimeData.overrideValues(data); 299 loadTimeData.overrideValues(data);
300 i18nTemplate.process(document, loadTimeData); 300 i18nTemplate.process(document, loadTimeData);
301 301
302 // Update language and input method menu lists. 302 // Update language and input method menu lists.
303 Oobe.setupSelect($('language-select'), data.languageList); 303 Oobe.setupSelect($('language-select'), data.languageList);
304 Oobe.setupSelect($('keyboard-select'), data.inputMethodsList); 304 Oobe.setupSelect($('keyboard-select'), data.inputMethodsList);
305 Oobe.setupSelect($('timezone-select'), data.timezoneList); 305 Oobe.setupSelect($('timezone-select'), data.timezoneList);
306 306
307 // ---------- Welcome screen 307 // ---------- Welcome screen
308 $('oobe-welcome-md').currentLanguage = 308 if (data.newOobeUI == 'on') {
michaelpg 2016/08/04 07:56:45 We know at startup whether or not the md-oobe flag
309 Oobe.getSelectedTitle(data.languageList); 309 var welcomeScreen = $('oobe-welcome-md');
310 welcomeScreen.currentLanguage =
311 Oobe.getSelectedTitle(data.languageList);
312 welcomeScreen.languages = data.languageList;
310 313
311 if (data.newOobeUI == 'on') { 314 welcomeScreen.keyboards = data.inputMethodsList;
315
312 $('oobe-connect').hidden = true; 316 $('oobe-connect').hidden = true;
313 $('oobe-welcome-md').hidden = false; 317 welcomeScreen.hidden = false;
318 welcomeScreen.enabled = true;
michaelpg 2016/08/04 07:56:45 I guess I would say if we want to enable/disable t
314 } else { 319 } else {
315 $('oobe-connect').hidden = false; 320 $('oobe-connect').hidden = false;
316 $('oobe-welcome-md').hidden = true; 321 $('oobe-welcome-md').hidden = true;
317 } 322 }
318 // ---------- 323 // ----------
319 324
320 // Update localized content of the screens. 325 // Update localized content of the screens.
321 Oobe.updateLocalizedContent(); 326 Oobe.updateLocalizedContent();
322 }, 327 },
323 328
324 /** 329 /**
325 * Updates localized content of the screens. 330 * Updates localized content of the screens.
326 * Should be executed on language change. 331 * Should be executed on language change.
327 */ 332 */
328 updateLocalizedContent: function() { 333 updateLocalizedContent: function() {
329 // Buttons, headers and links. 334 // Buttons, headers and links.
330 Oobe.getInstance().updateLocalizedContent_(); 335 Oobe.getInstance().updateLocalizedContent_();
331 } 336 }
332 }; 337 };
333 }); 338 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698