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