OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 7 |
8 /** | 8 /** |
9 * ManagedUserLearnMore class. | 9 * ManagedUserLearnMore class. |
10 * Encapsulated handling of the 'Learn more...' overlay page. | 10 * Encapsulated handling of the 'Learn more...' overlay page. |
11 * @constructor | 11 * @constructor |
12 * @class | 12 * @class |
13 */ | 13 */ |
14 function ManagedUserLearnMoreOverlay() { | 14 function ManagedUserLearnMoreOverlay() { |
15 OptionsPage.call(this, 'managedUserLearnMore', | 15 OptionsPage.call(this, 'managedUserLearnMore', |
16 loadTimeData.getString('managedUserLearnMoreTitle'), | 16 loadTimeData.getString('managedUserLearnMoreTitle'), |
17 'managed-user-learn-more'); | 17 'managed-user-learn-more'); |
18 }; | 18 }; |
19 | 19 |
20 cr.addSingletonGetter(ManagedUserLearnMoreOverlay); | 20 cr.addSingletonGetter(ManagedUserLearnMoreOverlay); |
21 | 21 |
22 ManagedUserLearnMoreOverlay.prototype = { | 22 ManagedUserLearnMoreOverlay.prototype = { |
23 // Inherit from OptionsPage. | 23 // Inherit from OptionsPage. |
24 __proto__: OptionsPage.prototype, | 24 __proto__: OptionsPage.prototype, |
25 | 25 |
26 /** | 26 /** @override */ |
27 * Initialize the page. | |
28 */ | |
29 initializePage: function() { | 27 initializePage: function() { |
30 OptionsPage.prototype.initializePage.call(this); | 28 OptionsPage.prototype.initializePage.call(this); |
31 | 29 |
32 $('managed-user-learn-more-done').onclick = function(event) { | 30 $('managed-user-learn-more-done').onclick = function(event) { |
33 OptionsPage.closeOverlay(); | 31 OptionsPage.closeOverlay(); |
34 }; | 32 }; |
35 }, | 33 }, |
36 }; | 34 }; |
37 | 35 |
38 // Export | 36 // Export |
39 return { | 37 return { |
40 ManagedUserLearnMoreOverlay: ManagedUserLearnMoreOverlay, | 38 ManagedUserLearnMoreOverlay: ManagedUserLearnMoreOverlay, |
41 }; | 39 }; |
42 }); | 40 }); |
OLD | NEW |