OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 if (loadTimeData.getBoolean('managedUsersEnabled')) { |
| 6 |
| 7 cr.define('options', function() { |
| 8 /** @const */ var OptionsPage = options.OptionsPage; |
| 9 |
| 10 ////////////////////////////////////////////////////////////////////////////// |
| 11 // ManagedUserSettings class: |
| 12 |
| 13 /** |
| 14 * Encapsulated handling of the Managed User Settings page. |
| 15 * @constructor |
| 16 * @class |
| 17 */ |
| 18 function ManagedUserSettings() { |
| 19 OptionsPage.call( |
| 20 this, |
| 21 'manageduser', |
| 22 loadTimeData.getString('managedUserSettingsPageTabTitle'), |
| 23 'managed-user-settings-page'); |
| 24 } |
| 25 |
| 26 cr.addSingletonGetter(ManagedUserSettings); |
| 27 |
| 28 ManagedUserSettings.prototype = { |
| 29 // Inherit from OptionsPage. |
| 30 __proto__: OptionsPage.prototype, |
| 31 |
| 32 /** |
| 33 * Initialize the page. |
| 34 * @override |
| 35 */ |
| 36 initializePage: function() { |
| 37 // Call base class implementation to start preference initialization. |
| 38 OptionsPage.prototype.initializePage.call(this); |
| 39 |
| 40 $('get-content-packs-button').onclick = function(event) { |
| 41 window.open(loadTimeData.getString('getContentPacksURL')); |
| 42 }; |
| 43 |
| 44 $('managed-user-settings-confirm').onclick = function() { |
| 45 OptionsPage.closeOverlay(); |
| 46 }; |
| 47 |
| 48 $('set-passphrase').onclick = function() { |
| 49 // TODO(bauerb): Set passphrase |
| 50 }; |
| 51 }, |
| 52 }; |
| 53 |
| 54 // Export |
| 55 return { |
| 56 ManagedUserSettings: ManagedUserSettings |
| 57 }; |
| 58 }); |
| 59 |
| 60 } |
OLD | NEW |