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 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 $('security-tpm-link').addEventListener('click', function(event) { | 88 $('security-tpm-link').addEventListener('click', function(event) { |
| 89 chrome.send('eulaOnTpmPopupOpened'); | 89 chrome.send('eulaOnTpmPopupOpened'); |
| 90 $('popup-overlay').hidden = false; | 90 $('popup-overlay').hidden = false; |
| 91 $('security-ok-button').focus(); | 91 $('security-ok-button').focus(); |
| 92 }); | 92 }); |
| 93 | 93 |
| 94 Oobe.initializeA11yMenu(); | 94 Oobe.initializeA11yMenu(); |
| 95 | 95 |
| 96 $('security-ok-button').addEventListener('click', function(event) { | 96 $('security-ok-button').addEventListener('click', function(event) { |
| 97 $('popup-overlay').hidden = true; | 97 $('popup-overlay').hidden = true; |
| 98 Oobe.getInstance().restoreFocus(); // Restore the screen's focus. | |
|
Nikita (slow)
2012/11/28 18:26:26
nit: Please place comment above this line.
mtomasz
2012/11/28 21:57:42
Done.
| |
| 98 }); | 99 }); |
| 99 // Do not allow focus leaving the overlay. | 100 // Do not allow focus leaving the overlay. |
| 100 $('popup-overlay').addEventListener('focusout', function(event) { | 101 $('popup-overlay').addEventListener('focusout', function(event) { |
| 101 // WebKit does not allow immediate focus return. | 102 // WebKit does not allow immediate focus return. |
| 102 setTimeout(function() { $('security-ok-button').focus(); }, 0); | 103 setTimeout(function() { $('security-ok-button').focus(); }, 0); |
| 103 event.preventDefault(); | 104 event.preventDefault(); |
| 104 }); | 105 }); |
| 105 | 106 |
| 106 chrome.send('screenStateInitialize'); | 107 chrome.send('screenStateInitialize'); |
| 107 }; | 108 }; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 // Allow selection events on components with editable text (password field) | 454 // Allow selection events on components with editable text (password field) |
| 454 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 455 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
| 455 disableTextSelectAndDrag(function(e) { | 456 disableTextSelectAndDrag(function(e) { |
| 456 var src = e.target; | 457 var src = e.target; |
| 457 return src instanceof HTMLTextAreaElement || | 458 return src instanceof HTMLTextAreaElement || |
| 458 src instanceof HTMLInputElement && | 459 src instanceof HTMLInputElement && |
| 459 /text|password|search/.test(src.type); | 460 /text|password|search/.test(src.type); |
| 460 }); | 461 }); |
| 461 | 462 |
| 462 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 463 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
| OLD | NEW |