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

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

Issue 2625263002: MD Settings: Convert reset profile banner to a dialog. (Closed)
Patch Set: Nit. Created 3 years, 10 months 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_profile_banner.js
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_banner.js b/chrome/browser/resources/settings/reset_page/reset_profile_banner.js
index 758582f22738753530d351af8ea28b56687717f1..9bece37a644abe9f3f4990733d0f803bf8f4f468 100644
--- a/chrome/browser/resources/settings/reset_page/reset_profile_banner.js
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_banner.js
@@ -4,37 +4,34 @@
/**
* @fileoverview
- * 'settings-reset-profile-banner' is the banner shown for clearing profile
- * settings.
+ * 'settings-reset-profile-banner' is the banner shown for propmting the user to
+ * clear profile settings.
*/
Polymer({
is: 'settings-reset-profile-banner',
- properties: {
- showResetProfileDialog_: {
- type: Boolean,
- value: false,
- },
+ listeners: {
+ 'cancel': 'onCancel_',
+ },
+
+ /** @override */
+ attached: function() {
+ this.$.dialog.showModal();
},
/** @private */
- onCloseTap_: function() {
- settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner();
- this.remove();
+ onOkTap_: function() {
+ this.$.dialog.cancel();
},
- /**
- * Shows a <settings-reset-profile-dialog>.
- * @param {!Event} e
- * @private
- */
- showDialog_: function(e) {
- e.preventDefault();
- this.showResetProfileDialog_ = true;
+ /** @private */
+ onCancel_: function() {
+ settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner();
},
/** @private */
- onDialogClose_: function() {
- this.showResetProfileDialog_ = false;
+ onResetTap_: function() {
+ this.$.dialog.close();
+ settings.navigateTo(settings.Route.RESET_DIALOG);
},
});

Powered by Google App Engine
This is Rietveld 408576698