| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 510 |
| 511 /** | 511 /** |
| 512 * Handles login success notification. | 512 * Handles login success notification. |
| 513 */ | 513 */ |
| 514 Oobe.onLoginSuccess = function(username) { | 514 Oobe.onLoginSuccess = function(username) { |
| 515 if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) { | 515 if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) { |
| 516 $('pod-row').startAuthenticatedAnimation(); | 516 $('pod-row').startAuthenticatedAnimation(); |
| 517 } | 517 } |
| 518 }; | 518 }; |
| 519 | 519 |
| 520 /** |
| 521 * Sets text content for a div with |labelId|. |
| 522 * @param {string} labelId Id of the label div. |
| 523 * @param {string} labelText Text for the label. |
| 524 */ |
| 525 Oobe.setLabelText = function(labelId, labelText) { |
| 526 $(labelId).textContent = labelText; |
| 527 }; |
| 528 |
| 520 // Export | 529 // Export |
| 521 return { | 530 return { |
| 522 Oobe: Oobe | 531 Oobe: Oobe |
| 523 }; | 532 }; |
| 524 }); | 533 }); |
| 525 | 534 |
| 526 var Oobe = cr.ui.Oobe; | 535 var Oobe = cr.ui.Oobe; |
| 527 | 536 |
| 528 // Disable text selection. | 537 // Disable text selection. |
| 529 document.onselectstart = function(e) { | 538 document.onselectstart = function(e) { |
| 530 e.preventDefault(); | 539 e.preventDefault(); |
| 531 } | 540 } |
| 532 | 541 |
| 533 // Disable dragging. | 542 // Disable dragging. |
| 534 document.ondragstart = function(e) { | 543 document.ondragstart = function(e) { |
| 535 e.preventDefault(); | 544 e.preventDefault(); |
| 536 } | 545 } |
| 537 | 546 |
| 538 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 547 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
| OLD | NEW |