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 if (loadTimeData.getBoolean('managedUsersEnabled')) { | 5 if (loadTimeData.getBoolean('managedUsersEnabled')) { |
6 | 6 |
7 cr.define('options', function() { | 7 cr.define('options', function() { |
8 /** @const */ var OptionsPage = options.OptionsPage; | |
9 /** @const */ var SettingsDialog = options.SettingsDialog; | 8 /** @const */ var SettingsDialog = options.SettingsDialog; |
10 | 9 |
11 ////////////////////////////////////////////////////////////////////////////// | 10 ////////////////////////////////////////////////////////////////////////////// |
12 // ManagedUserSettings class: | 11 // ManagedUserSettings class: |
13 | 12 |
14 /** | 13 /** |
15 * Encapsulated handling of the Managed User Settings page. | 14 * Encapsulated handling of the Managed User Settings page. |
16 * @constructor | 15 * @constructor |
17 * @class | 16 * @class |
18 */ | 17 */ |
(...skipping 19 matching lines...) Expand all Loading... |
38 */ | 37 */ |
39 initializePage: function() { | 38 initializePage: function() { |
40 // Call base class implementation to start preference initialization. | 39 // Call base class implementation to start preference initialization. |
41 SettingsDialog.prototype.initializePage.call(this); | 40 SettingsDialog.prototype.initializePage.call(this); |
42 | 41 |
43 $('get-content-packs-button').onclick = function(event) { | 42 $('get-content-packs-button').onclick = function(event) { |
44 window.open(loadTimeData.getString('getContentPacksURL')); | 43 window.open(loadTimeData.getString('getContentPacksURL')); |
45 }; | 44 }; |
46 | 45 |
47 $('set-passphrase').onclick = function() { | 46 $('set-passphrase').onclick = function() { |
48 OptionsPage.navigateToPage('setPassphrase'); | 47 // TODO(bauerb): Set passphrase |
49 }; | 48 }; |
50 | 49 |
51 }, | 50 }, |
52 /** @override */ | 51 /** @override */ |
53 handleConfirm: function() { | 52 handleConfirm: function() { |
54 chrome.send('confirmManagedUserSettings'); | 53 chrome.send('confirmManagedUserSettings'); |
55 SettingsDialog.prototype.handleConfirm.call(this); | 54 SettingsDialog.prototype.handleConfirm.call(this); |
56 }, | 55 }, |
57 }; | 56 }; |
58 | 57 |
59 var ManagedUserSettingsForTesting = { | |
60 getSetPassphraseButton: function() { | |
61 return $('set-passphrase'); | |
62 } | |
63 }; | |
64 | |
65 // Export | 58 // Export |
66 return { | 59 return { |
67 ManagedUserSettings: ManagedUserSettings, | 60 ManagedUserSettings: ManagedUserSettings |
68 ManagedUserSettingsForTesting: ManagedUserSettingsForTesting | |
69 }; | 61 }; |
70 }); | 62 }); |
71 | 63 |
72 } | 64 } |
OLD | NEW |