OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 cr.define('reset', function() { | 5 cr.define('reset', function() { |
6 | 6 |
7 var USER_ACTION_RESET_CONFIRM_DISMISSED = 'reset-confirm-dismissed'; | 7 var USER_ACTION_RESET_CONFIRM_DISMISSED = 'reset-confirm-dismissed'; |
8 /** | 8 /** |
9 * ResetScreenConfirmationOverlay class | 9 * ResetScreenConfirmationOverlay class |
10 * Encapsulated handling of the 'Confirm reset device' overlay OOBE page. | 10 * Encapsulated handling of the 'Confirm reset device' overlay OOBE page. |
11 * @class | 11 * @class |
12 */ | 12 */ |
13 function ConfirmResetOverlay() { | 13 function ConfirmResetOverlay() {} |
14 } | |
15 | 14 |
16 cr.addSingletonGetter(ConfirmResetOverlay); | 15 cr.addSingletonGetter(ConfirmResetOverlay); |
17 | 16 |
18 ConfirmResetOverlay.prototype = { | 17 ConfirmResetOverlay.prototype = { |
19 /** | 18 /** |
20 * Initialize the page. | 19 * Initialize the page. |
21 */ | 20 */ |
22 initializePage: function() { | 21 initializePage: function() { |
23 var overlay = $('reset-confirm-overlay'); | 22 var overlay = $('reset-confirm-overlay'); |
24 overlay.addEventListener('cancelOverlay', function(e) { | 23 overlay.addEventListener('cancelOverlay', function(e) { |
25 $('reset').send(login.Screen.CALLBACK_USER_ACTED, | 24 $('reset').send( |
26 USER_ACTION_RESET_CONFIRM_DISMISSED); | 25 login.Screen.CALLBACK_USER_ACTED, |
| 26 USER_ACTION_RESET_CONFIRM_DISMISSED); |
27 e.stopPropagation(); | 27 e.stopPropagation(); |
28 }); | 28 }); |
29 $('overlay-reset').removeAttribute('hidden'); | 29 $('overlay-reset').removeAttribute('hidden'); |
30 }, | 30 }, |
31 }; | 31 }; |
32 | 32 |
33 // Export | 33 // Export |
34 return { | 34 return {ConfirmResetOverlay: ConfirmResetOverlay}; |
35 ConfirmResetOverlay: ConfirmResetOverlay | |
36 }; | |
37 }); | 35 }); |
OLD | NEW |