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 Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 | 7 |
8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; | 8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; |
| 9 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; |
9 | 10 |
10 /** | 11 /** |
11 * ResetProfileSettingsOverlay class | 12 * ResetProfileSettingsOverlay class |
12 * Encapsulated handling of the 'Reset Profile Settings' overlay page. | 13 * Encapsulated handling of the 'Reset Profile Settings' overlay page. |
13 * @class | 14 * @class |
14 */ | 15 */ |
15 function ResetProfileSettingsOverlay() { | 16 function ResetProfileSettingsOverlay() { |
16 Page.call(this, 'resetProfileSettings', | 17 Page.call(this, 'resetProfileSettings', |
17 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'), | 18 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'), |
18 'reset-profile-settings-overlay'); | 19 'reset-profile-settings-overlay'); |
(...skipping 18 matching lines...) Expand all Loading... |
37 [$('send-settings').checked]); | 38 [$('send-settings').checked]); |
38 }; | 39 }; |
39 $('expand-feedback').onclick = function(event) { | 40 $('expand-feedback').onclick = function(event) { |
40 var feedbackTemplate = $('feedback-template'); | 41 var feedbackTemplate = $('feedback-template'); |
41 feedbackTemplate.hidden = !feedbackTemplate.hidden; | 42 feedbackTemplate.hidden = !feedbackTemplate.hidden; |
42 }; | 43 }; |
43 }, | 44 }, |
44 | 45 |
45 /** @override */ | 46 /** @override */ |
46 didShowPage: function() { | 47 didShowPage: function() { |
| 48 ResetProfileSettingsBanner.dismiss(); |
47 chrome.send('onShowResetProfileDialog'); | 49 chrome.send('onShowResetProfileDialog'); |
48 }, | 50 }, |
49 | 51 |
50 /** @override */ | 52 /** @override */ |
51 didClosePage: function() { | 53 didClosePage: function() { |
52 chrome.send('onHideResetProfileDialog'); | 54 chrome.send('onHideResetProfileDialog'); |
53 }, | 55 }, |
54 }; | 56 }; |
55 | 57 |
56 /** | 58 /** |
(...skipping 28 matching lines...) Expand all Loading... |
85 var input = new JsEvalContext(feedbackListData); | 87 var input = new JsEvalContext(feedbackListData); |
86 var output = $('feedback-template'); | 88 var output = $('feedback-template'); |
87 jstProcess(input, output); | 89 jstProcess(input, output); |
88 }; | 90 }; |
89 | 91 |
90 // Export | 92 // Export |
91 return { | 93 return { |
92 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 94 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
93 }; | 95 }; |
94 }); | 96 }); |
OLD | NEW |