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 Account picker screen implementation. | 6 * @fileoverview Account picker screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('AccountPickerScreen', 'account-picker', function() { | 9 login.createScreen('AccountPickerScreen', 'account-picker', function() { |
10 /** | 10 /** |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 */ | 69 */ |
70 exit: function() { | 70 exit: function() { |
71 // Check and disable the sign out button so that we can never have two | 71 // Check and disable the sign out button so that we can never have two |
72 // sign out requests generated in a row. | 72 // sign out requests generated in a row. |
73 if ($('pod-row').lockedPod && !$('sign-out-user-button').disabled) { | 73 if ($('pod-row').lockedPod && !$('sign-out-user-button').disabled) { |
74 $('sign-out-user-button').disabled = true; | 74 $('sign-out-user-button').disabled = true; |
75 chrome.send('signOutUser'); | 75 chrome.send('signOutUser'); |
76 } | 76 } |
77 }, | 77 }, |
78 | 78 |
| 79 /* Cancel user adding if ESC was pressed. |
| 80 */ |
| 81 cancel: function() { |
| 82 if (Oobe.getInstance().displayType() == DISPLAY_TYPE.USER_ADDING) |
| 83 chrome.send('cancelUserAdding'); |
| 84 }, |
| 85 |
79 /** | 86 /** |
80 * Event handler that is invoked just after the frame is shown. | 87 * Event handler that is invoked just after the frame is shown. |
81 * @param {string} data Screen init payload. | 88 * @param {string} data Screen init payload. |
82 */ | 89 */ |
83 onAfterShow: function(data) { | 90 onAfterShow: function(data) { |
84 $('pod-row').handleAfterShow(); | 91 $('pod-row').handleAfterShow(); |
85 }, | 92 }, |
86 | 93 |
87 /** | 94 /** |
88 * Event handler that is invoked just before the frame is shown. | 95 * Event handler that is invoked just before the frame is shown. |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 * is used by the chrome.screenlockPrivate API. | 254 * is used by the chrome.screenlockPrivate API. |
248 * @param {string} username Username of pod to add button | 255 * @param {string} username Username of pod to add button |
249 * @param {string} iconURL URL of the button icon | 256 * @param {string} iconURL URL of the button icon |
250 */ | 257 */ |
251 showUserPodButton: function(username, iconURL) { | 258 showUserPodButton: function(username, iconURL) { |
252 $('pod-row').showUserPodButton(username, iconURL); | 259 $('pod-row').showUserPodButton(username, iconURL); |
253 } | 260 } |
254 }; | 261 }; |
255 }); | 262 }); |
256 | 263 |
OLD | NEW |