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 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 }; | 509 }; |
510 | 510 |
511 /** | 511 /** |
512 * Displays the given |termsOfService| on the Terms of Service screen. | 512 * Displays the given |termsOfService| on the Terms of Service screen. |
513 * @param {string} termsOfService The terms of service, as plain text. | 513 * @param {string} termsOfService The terms of service, as plain text. |
514 */ | 514 */ |
515 Oobe.setTermsOfService = function(termsOfService) { | 515 Oobe.setTermsOfService = function(termsOfService) { |
516 oobe.TermsOfServiceScreen.setTermsOfService(termsOfService); | 516 oobe.TermsOfServiceScreen.setTermsOfService(termsOfService); |
517 }; | 517 }; |
518 | 518 |
| 519 /** |
| 520 * Clears password field in user-pod. |
| 521 */ |
| 522 Oobe.clearUserPodPassword = function() { |
| 523 DisplayManager.clearUserPodPassword(); |
| 524 }; |
| 525 |
519 // Export | 526 // Export |
520 return { | 527 return { |
521 Oobe: Oobe | 528 Oobe: Oobe |
522 }; | 529 }; |
523 }); | 530 }); |
524 | 531 |
525 var Oobe = cr.ui.Oobe; | 532 var Oobe = cr.ui.Oobe; |
526 | 533 |
527 // Allow selection events on components with editable text (password field) | 534 // Allow selection events on components with editable text (password field) |
528 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 535 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
529 disableTextSelectAndDrag(function(e) { | 536 disableTextSelectAndDrag(function(e) { |
530 var src = e.target; | 537 var src = e.target; |
531 return src instanceof HTMLTextAreaElement || | 538 return src instanceof HTMLTextAreaElement || |
532 src instanceof HTMLInputElement && | 539 src instanceof HTMLInputElement && |
533 /text|password|search/.test(src.type); | 540 /text|password|search/.test(src.type); |
534 }); | 541 }); |
535 | 542 |
536 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 543 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
OLD | NEW |