Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6043)

Unified Diff: chrome/browser/resources/settings/reset_page/reset_page.js

Issue 1418803004: MD Settings: Migrating C++ handlers for profile reset page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove usage of max-width to fix dialog positioning. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..28380ad4f745449880b4e7c8fc535a1ed6f38851 100644
--- a/chrome/browser/resources/settings/reset_page/reset_page.js
+++ b/chrome/browser/resources/settings/reset_page/reset_page.js
@@ -21,25 +21,52 @@
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);
+ }.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() {
+ this.$.sendSettings.checked ?
+ this.$.settings.removeAttribute('hidden') :
+ this.$.settings.setAttribute('hidden', true);
Dan Beam 2015/11/07 00:07:06 this.$.settings.hidden = !this.$.sendSettings.chec
dpapad 2015/11/07 00:31:08 Done.
}
});

Powered by Google App Engine
This is Rietveld 408576698