Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 var welcomeScreen = $('oobe-welcome-md'); |
| 309 Oobe.getSelectedTitle(data.languageList); | 309 welcomeScreen.currentLanguage = Oobe.getSelectedTitle(data.languageList); |
| 310 welcomeScreen.oobeLanguages = data.languageList; | |
| 311 | |
| 312 welcomeScreen.oobeKeyboards = data.inputMethodsList; | |
|
stevenjb
2016/07/29 16:11:52
nit: shouldn't we only do this inside the if below
Alexander Alekseev
2016/07/30 00:52:50
Done.
| |
| 310 | 313 |
| 311 if (data.newOobeUI == 'on') { | 314 if (data.newOobeUI == 'on') { |
| 312 $('oobe-connect').hidden = true; | 315 $('oobe-connect').hidden = true; |
| 313 $('oobe-welcome-md').hidden = false; | 316 $('oobe-welcome-md').hidden = false; |
| 314 } else { | 317 } else { |
| 315 $('oobe-connect').hidden = false; | 318 $('oobe-connect').hidden = false; |
| 316 $('oobe-welcome-md').hidden = true; | 319 $('oobe-welcome-md').hidden = true; |
| 317 } | 320 } |
| 318 // ---------- | 321 // ---------- |
| 319 | 322 |
| 320 // Update localized content of the screens. | 323 // Update localized content of the screens. |
| 321 Oobe.updateLocalizedContent(); | 324 Oobe.updateLocalizedContent(); |
| 322 }, | 325 }, |
| 323 | 326 |
| 324 /** | 327 /** |
| 325 * Updates localized content of the screens. | 328 * Updates localized content of the screens. |
| 326 * Should be executed on language change. | 329 * Should be executed on language change. |
| 327 */ | 330 */ |
| 328 updateLocalizedContent: function() { | 331 updateLocalizedContent: function() { |
| 329 // Buttons, headers and links. | 332 // Buttons, headers and links. |
| 330 Oobe.getInstance().updateLocalizedContent_(); | 333 Oobe.getInstance().updateLocalizedContent_(); |
| 331 } | 334 } |
| 332 }; | 335 }; |
| 333 }); | 336 }); |
| OLD | NEW |