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 19 matching lines...) Expand all Loading... |
38 }; | 39 }; |
39 $('expand-feedback').onclick = function(e) { | 40 $('expand-feedback').onclick = function(e) { |
40 var feedbackTemplate = $('feedback-template'); | 41 var feedbackTemplate = $('feedback-template'); |
41 feedbackTemplate.hidden = !feedbackTemplate.hidden; | 42 feedbackTemplate.hidden = !feedbackTemplate.hidden; |
42 e.preventDefault(); | 43 e.preventDefault(); |
43 }; | 44 }; |
44 }, | 45 }, |
45 | 46 |
46 /** @override */ | 47 /** @override */ |
47 didShowPage: function() { | 48 didShowPage: function() { |
| 49 ResetProfileSettingsBanner.dismiss(); |
48 chrome.send('onShowResetProfileDialog'); | 50 chrome.send('onShowResetProfileDialog'); |
49 }, | 51 }, |
50 | 52 |
51 /** @override */ | 53 /** @override */ |
52 didClosePage: function() { | 54 didClosePage: function() { |
53 chrome.send('onHideResetProfileDialog'); | 55 chrome.send('onHideResetProfileDialog'); |
54 }, | 56 }, |
55 }; | 57 }; |
56 | 58 |
57 /** | 59 /** |
(...skipping 28 matching lines...) Expand all Loading... |
86 var input = new JsEvalContext(feedbackListData); | 88 var input = new JsEvalContext(feedbackListData); |
87 var output = $('feedback-template'); | 89 var output = $('feedback-template'); |
88 jstProcess(input, output); | 90 jstProcess(input, output); |
89 }; | 91 }; |
90 | 92 |
91 // Export | 93 // Export |
92 return { | 94 return { |
93 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 95 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
94 }; | 96 }; |
95 }); | 97 }); |
OLD | NEW |