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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 options.ProfilesIconGrid.decorate($('create-profile-icon-grid')); | 45 options.ProfilesIconGrid.decorate($('create-profile-icon-grid')); |
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', | |
56 ['Options_ManagedUserPassphraseOverlay']); | |
57 }; | 55 }; |
58 } | 56 } |
59 $('manage-profile-cancel').onclick = | 57 $('manage-profile-cancel').onclick = |
60 $('delete-profile-cancel').onclick = | 58 $('delete-profile-cancel').onclick = |
61 $('create-profile-cancel').onclick = function(event) { | 59 $('create-profile-cancel').onclick = function(event) { |
62 OptionsPage.closeOverlay(); | 60 OptionsPage.closeOverlay(); |
63 }; | 61 }; |
64 $('delete-profile-ok').onclick = function(event) { | 62 $('delete-profile-ok').onclick = function(event) { |
65 OptionsPage.closeOverlay(); | 63 OptionsPage.closeOverlay(); |
66 chrome.send('deleteProfile', [self.profileInfo_.filePath]); | 64 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; | 419 $('create-profile-ok').disabled = true; |
422 }, | 420 }, |
423 }; | 421 }; |
424 | 422 |
425 // Export | 423 // Export |
426 return { | 424 return { |
427 ManageProfileOverlay: ManageProfileOverlay, | 425 ManageProfileOverlay: ManageProfileOverlay, |
428 CreateProfileOverlay: CreateProfileOverlay, | 426 CreateProfileOverlay: CreateProfileOverlay, |
429 }; | 427 }; |
430 }); | 428 }); |
OLD | NEW |