| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
| 7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
| 8 | 8 |
| 9 ///////////////////////////////////////////////////////////////////////////// | 9 ///////////////////////////////////////////////////////////////////////////// |
| 10 // AccountsOptions class: | 10 // AccountsOptions class: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 !$('useWhitelistCheck').checked; | 74 !$('useWhitelistCheck').checked; |
| 75 }, | 75 }, |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * Handler for Page's visible property change event. | 78 * Handler for Page's visible property change event. |
| 79 * @private | 79 * @private |
| 80 * @param {Event} e Property change event. | 80 * @param {Event} e Property change event. |
| 81 */ | 81 */ |
| 82 handleVisibleChange_: function(e) { | 82 handleVisibleChange_: function(e) { |
| 83 if (this.visible) { | 83 if (this.visible) { |
| 84 chrome.send('updateWhitelist'); |
| 84 this.updateControls_(); | 85 this.updateControls_(); |
| 85 if (this.showWhitelist_) | 86 if (this.showWhitelist_) |
| 86 $('userList').redraw(); | 87 $('userList').redraw(); |
| 87 } | 88 } |
| 88 }, | 89 }, |
| 89 | 90 |
| 90 /** | 91 /** |
| 91 * Handler for allow guest check change. | 92 * Handler for allow guest check change. |
| 92 * @private | 93 * @private |
| 93 */ | 94 */ |
| 94 handleUseWhitelistCheckChange_: function(e) { | 95 handleUseWhitelistCheckChange_: function(e) { |
| 95 // Whitelist existing users when guest login is being disabled. | 96 // Whitelist existing users when guest login is being disabled. |
| 96 if ($('useWhitelistCheck').checked) { | 97 if ($('useWhitelistCheck').checked) { |
| 97 chrome.send('whitelistExistingUsers'); | 98 chrome.send('updateWhitelist'); |
| 98 } | 99 } |
| 99 | 100 |
| 100 this.updateControls_(); | 101 this.updateControls_(); |
| 101 }, | 102 }, |
| 102 | 103 |
| 103 /** | 104 /** |
| 104 * handler for allow guest pref change. | 105 * handler for allow guest pref change. |
| 105 * @private | 106 * @private |
| 106 */ | 107 */ |
| 107 handleUseWhitelistPrefChange_: function(e) { | 108 handleUseWhitelistPrefChange_: function(e) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 if (this.showWhitelist_) | 148 if (this.showWhitelist_) |
| 148 $('userList').updateAccountPicture(username); | 149 $('userList').updateAccountPicture(username); |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 // Export | 152 // Export |
| 152 return { | 153 return { |
| 153 AccountsOptions: AccountsOptions | 154 AccountsOptions: AccountsOptions |
| 154 }; | 155 }; |
| 155 | 156 |
| 156 }); | 157 }); |
| OLD | NEW |