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 |
| 8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; |
7 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; | 9 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; |
8 | 10 |
9 /** | 11 /** |
10 * ResetProfileSettingsOverlay class | 12 * ResetProfileSettingsOverlay class |
11 * Encapsulated handling of the 'Reset Profile Settings' overlay page. | 13 * Encapsulated handling of the 'Reset Profile Settings' overlay page. |
12 * @class | 14 * @class |
13 */ | 15 */ |
14 function ResetProfileSettingsOverlay() { | 16 function ResetProfileSettingsOverlay() { |
15 OptionsPage.call( | 17 OptionsPage.call( |
16 this, 'resetProfileSettings', | 18 this, 'resetProfileSettings', |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 state ? 'visible' : 'hidden'; | 67 state ? 'visible' : 'hidden'; |
66 $('reset-profile-settings-dismiss').disabled = state; | 68 $('reset-profile-settings-dismiss').disabled = state; |
67 $('reset-profile-settings-commit').disabled = state; | 69 $('reset-profile-settings-commit').disabled = state; |
68 }; | 70 }; |
69 | 71 |
70 /** | 72 /** |
71 * Chrome callback to notify ResetProfileSettingsOverlay that the reset | 73 * Chrome callback to notify ResetProfileSettingsOverlay that the reset |
72 * operation has terminated. | 74 * operation has terminated. |
73 */ | 75 */ |
74 ResetProfileSettingsOverlay.doneResetting = function() { | 76 ResetProfileSettingsOverlay.doneResetting = function() { |
| 77 AutomaticSettingsResetBanner.dismiss(); |
75 ResetProfileSettingsOverlay.dismiss(); | 78 ResetProfileSettingsOverlay.dismiss(); |
76 }; | 79 }; |
77 | 80 |
78 /** | 81 /** |
79 * Dismisses the overlay. | 82 * Dismisses the overlay. |
80 */ | 83 */ |
81 ResetProfileSettingsOverlay.dismiss = function() { | 84 ResetProfileSettingsOverlay.dismiss = function() { |
82 OptionsPage.closeOverlay(); | 85 OptionsPage.closeOverlay(); |
83 ResetProfileSettingsOverlay.setResettingState(false); | 86 ResetProfileSettingsOverlay.setResettingState(false); |
84 }; | 87 }; |
85 | 88 |
86 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) { | 89 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) { |
87 var input = new JsEvalContext(feedbackListData); | 90 var input = new JsEvalContext(feedbackListData); |
88 var output = $('feedback-template'); | 91 var output = $('feedback-template'); |
89 jstProcess(input, output); | 92 jstProcess(input, output); |
90 }; | 93 }; |
91 | 94 |
92 // Export | 95 // Export |
93 return { | 96 return { |
94 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 97 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
95 }; | 98 }; |
96 }); | 99 }); |
OLD | NEW |