Index: chrome/browser/resources/settings/reset_page/reset_page.js |
diff --git a/chrome/browser/resources/settings/reset_page/reset_page.js b/chrome/browser/resources/settings/reset_page/reset_page.js |
index f27b892e832b2bd32899b2415dc91fff9d91f525..4d8063df0a722acecff42e359c9203713797c4a8 100644 |
--- a/chrome/browser/resources/settings/reset_page/reset_page.js |
+++ b/chrome/browser/resources/settings/reset_page/reset_page.js |
@@ -21,25 +21,54 @@ |
Polymer({ |
is: 'settings-reset-page', |
+ properties: { |
+ feedbackInfo_: String, |
+ }, |
+ |
+ attached: function() { |
+ cr.define('SettingsResetPage', function() { |
+ return { |
+ doneResetting: function() { |
+ this.$.resetSpinner.active = false; |
+ this.$.resetDialog.close(); |
+ }.bind(this), |
+ |
+ setFeedbackInfo: function(data) { |
+ this.set('feedbackInfo_', data.feedbackInfo); |
+ this.async(function() { |
+ this.$.resetDialog.center(); |
+ }); |
+ }.bind(this), |
+ }; |
+ }.bind(this)); |
+ }, |
+ |
/** @private */ |
onShowDialog_: function() { |
this.$.resetDialog.open(); |
+ chrome.send('onShowResetProfileDialog'); |
}, |
/** @private */ |
onCancelTap_: function() { |
this.$.resetDialog.close(); |
+ chrome.send('onHideResetProfileDialog'); |
}, |
/** @private */ |
onResetTap_: function() { |
- // TODO(dpapad): Set up C++ handlers and figure out when it is OK to close |
- // the dialog. |
- this.$.resetDialog.close(); |
+ this.$.resetSpinner.active = true; |
+ chrome.send('performResetProfileSettings', [this.$.sendSettings.checked]); |
}, |
/** @private */ |
onLearnMoreTap_: function() { |
window.open(loadTimeData.getString('resetPageLearnMoreUrl')); |
+ }, |
+ |
+ /** @private */ |
+ onCheckboxChange_: function() { |
Dan Beam
2015/11/07 03:19:26
TODO(dpapad): find out what should actually show t
dpapad
2015/11/09 18:51:10
Done. Added TODO.
|
+ this.$.settings.hidden = !this.$.sendSettings.checked; |
+ this.$.resetDialog.center(); |
} |
}); |