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 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; | 7 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; |
8 | 8 |
9 /** | 9 /** |
10 * ResetProfileSettingsOverlay class | 10 * ResetProfileSettingsOverlay class |
11 * Encapsulated handling of the 'Reset Profile Settings' overlay page. | 11 * Encapsulated handling of the 'Reset Profile Settings' overlay page. |
12 * @class | 12 * @class |
13 */ | 13 */ |
14 function ResetProfileSettingsOverlay() { | 14 function ResetProfileSettingsOverlay() { |
15 OptionsPage.call( | 15 OptionsPage.call( |
16 this, 'resetProfileSettings', | 16 this, 'resetProfileSettings', |
17 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'), | 17 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'), |
18 'reset-profile-settings-overlay'); | 18 'reset-profile-settings-overlay'); |
19 } | 19 } |
20 | 20 |
21 cr.addSingletonGetter(ResetProfileSettingsOverlay); | 21 cr.addSingletonGetter(ResetProfileSettingsOverlay); |
22 | 22 |
23 ResetProfileSettingsOverlay.prototype = { | 23 ResetProfileSettingsOverlay.prototype = { |
24 // Inherit ResetProfileSettingsOverlay from OptionsPage. | 24 // Inherit ResetProfileSettingsOverlay from OptionsPage. |
25 __proto__: OptionsPage.prototype, | 25 __proto__: OptionsPage.prototype, |
26 | 26 |
27 /** | 27 /** @override */ |
28 * Initialize the page. | |
29 */ | |
30 initializePage: function() { | 28 initializePage: function() { |
31 OptionsPage.prototype.initializePage.call(this); | 29 OptionsPage.prototype.initializePage.call(this); |
32 | 30 |
33 $('reset-profile-settings-dismiss').onclick = function(event) { | 31 $('reset-profile-settings-dismiss').onclick = function(event) { |
34 ResetProfileSettingsOverlay.dismiss(); | 32 ResetProfileSettingsOverlay.dismiss(); |
35 }; | 33 }; |
36 $('reset-profile-settings-commit').onclick = function(event) { | 34 $('reset-profile-settings-commit').onclick = function(event) { |
37 ResetProfileSettingsOverlay.setResettingState(true); | 35 ResetProfileSettingsOverlay.setResettingState(true); |
38 chrome.send('performResetProfileSettings', | 36 chrome.send('performResetProfileSettings', |
39 [$('send-settings').checked]); | 37 [$('send-settings').checked]); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 var input = new JsEvalContext(feedbackListData); | 85 var input = new JsEvalContext(feedbackListData); |
88 var output = $('feedback-template'); | 86 var output = $('feedback-template'); |
89 jstProcess(input, output); | 87 jstProcess(input, output); |
90 }; | 88 }; |
91 | 89 |
92 // Export | 90 // Export |
93 return { | 91 return { |
94 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 92 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
95 }; | 93 }; |
96 }); | 94 }); |
OLD | NEW |