| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 Oobe.setupSelect($('keyboard-select'), data.inputMethodsList); | 349 Oobe.setupSelect($('keyboard-select'), data.inputMethodsList); |
| 350 Oobe.setupSelect($('timezone-select'), data.timezoneList); | 350 Oobe.setupSelect($('timezone-select'), data.timezoneList); |
| 351 | 351 |
| 352 this.setMDMode_(); | 352 this.setMDMode_(); |
| 353 | 353 |
| 354 // Update localized content of the screens. | 354 // Update localized content of the screens. |
| 355 Oobe.updateLocalizedContent(); | 355 Oobe.updateLocalizedContent(); |
| 356 }, | 356 }, |
| 357 | 357 |
| 358 /** | 358 /** |
| 359 * Reloads localized strings for the eula page. |
| 360 * @param {!Object} data New dictionary with changed eula i18n values. |
| 361 */ |
| 362 reloadEulaContent: function(data) { |
| 363 loadTimeData.overrideValues(data); |
| 364 i18nTemplate.process(document, loadTimeData); |
| 365 }, |
| 366 |
| 367 /** |
| 359 * Updates localized content of the screens. | 368 * Updates localized content of the screens. |
| 360 * Should be executed on language change. | 369 * Should be executed on language change. |
| 361 */ | 370 */ |
| 362 updateLocalizedContent: function() { | 371 updateLocalizedContent: function() { |
| 363 // Buttons, headers and links. | 372 // Buttons, headers and links. |
| 364 Oobe.getInstance().updateLocalizedContent_(); | 373 Oobe.getInstance().updateLocalizedContent_(); |
| 365 }, | 374 }, |
| 366 | 375 |
| 367 /** | 376 /** |
| 368 * This method takes care of switching to material-design OOBE. | 377 * This method takes care of switching to material-design OOBE. |
| 369 * @private | 378 * @private |
| 370 */ | 379 */ |
| 371 setMDMode_: function() { | 380 setMDMode_: function() { |
| 372 if (loadTimeData.getString('newOobeUI') == 'on') { | 381 if (loadTimeData.getString('newOobeUI') == 'on') { |
| 373 $('oobe').setAttribute('md-mode', 'true'); | 382 $('oobe').setAttribute('md-mode', 'true'); |
| 374 $('oobe-shield').setAttribute('md-mode', 'true'); | 383 $('oobe-shield').setAttribute('md-mode', 'true'); |
| 375 $('popup-overlay').setAttribute('md-mode', 'true'); | 384 $('popup-overlay').setAttribute('md-mode', 'true'); |
| 376 } else { | 385 } else { |
| 377 $('oobe').removeAttribute('md-mode'); | 386 $('oobe').removeAttribute('md-mode'); |
| 378 $('oobe-shield').removeAttribute('md-mode'); | 387 $('oobe-shield').removeAttribute('md-mode'); |
| 379 $('popup-overlay').removeAttribute('md-mode'); | 388 $('popup-overlay').removeAttribute('md-mode'); |
| 380 } | 389 } |
| 381 }, | 390 }, |
| 382 }; | 391 }; |
| 383 }); | 392 }); |
| OLD | NEW |