| 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 OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * ManageProfileOverlay class | 10 * ManageProfileOverlay class |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 self.registerCommonEventHandlers_('create', | 46 self.registerCommonEventHandlers_('create', |
| 47 self.submitCreateProfile_.bind(self)); | 47 self.submitCreateProfile_.bind(self)); |
| 48 self.registerCommonEventHandlers_('manage', | 48 self.registerCommonEventHandlers_('manage', |
| 49 self.submitManageChanges_.bind(self)); | 49 self.submitManageChanges_.bind(self)); |
| 50 | 50 |
| 51 if (loadTimeData.getBoolean('managedUsersEnabled')) { | 51 if (loadTimeData.getBoolean('managedUsersEnabled')) { |
| 52 $('create-profile-managed-container').hidden = false; | 52 $('create-profile-managed-container').hidden = false; |
| 53 $('managed-user-settings-button').onclick = function(event) { | 53 $('managed-user-settings-button').onclick = function(event) { |
| 54 OptionsPage.navigateToPage('managedUser'); | 54 OptionsPage.navigateToPage('managedUser'); |
| 55 chrome.send('coreOptionsUserMetricsAction', | 55 chrome.send('coreOptionsUserMetricsAction', |
| 56 ['Options_ManagedUserPassphraseOverlay']); | 56 ['ManagedMode_LocallyManagedUserCreated']); |
| 57 }; | 57 }; |
| 58 } | 58 } |
| 59 $('manage-profile-cancel').onclick = | 59 $('manage-profile-cancel').onclick = |
| 60 $('delete-profile-cancel').onclick = | 60 $('delete-profile-cancel').onclick = |
| 61 $('create-profile-cancel').onclick = function(event) { | 61 $('create-profile-cancel').onclick = function(event) { |
| 62 OptionsPage.closeOverlay(); | 62 OptionsPage.closeOverlay(); |
| 63 }; | 63 }; |
| 64 $('delete-profile-ok').onclick = function(event) { | 64 $('delete-profile-ok').onclick = function(event) { |
| 65 OptionsPage.closeOverlay(); | 65 OptionsPage.closeOverlay(); |
| 66 chrome.send('deleteProfile', [self.profileInfo_.filePath]); | 66 chrome.send('deleteProfile', [self.profileInfo_.filePath]); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 $('create-profile-ok').disabled = true; | 421 $('create-profile-ok').disabled = true; |
| 422 }, | 422 }, |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 // Export | 425 // Export |
| 426 return { | 426 return { |
| 427 ManageProfileOverlay: ManageProfileOverlay, | 427 ManageProfileOverlay: ManageProfileOverlay, |
| 428 CreateProfileOverlay: CreateProfileOverlay, | 428 CreateProfileOverlay: CreateProfileOverlay, |
| 429 }; | 429 }; |
| 430 }); | 430 }); |
| OLD | NEW |