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

Side by Side Diff: chrome/browser/resources/settings/reset_page/reset_profile_dialog.js

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflicts with Tommy's CL. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile 7 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile
8 * settings. 8 * settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 11 matching lines...) Expand all
22 }, 22 },
23 }, 23 },
24 24
25 /** @private {!settings.ResetBrowserProxy} */ 25 /** @private {!settings.ResetBrowserProxy} */
26 browserProxy_: null, 26 browserProxy_: null,
27 27
28 /** @override */ 28 /** @override */
29 ready: function() { 29 ready: function() {
30 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance(); 30 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance();
31 31
32 this.addEventListener('iron-overlay-canceled', function() { 32 this.addEventListener('cancel', function() {
33 this.browserProxy_.onHideResetProfileDialog(); 33 this.browserProxy_.onHideResetProfileDialog();
34 }.bind(this)); 34 }.bind(this));
35 }, 35 },
36 36
37 open: function() { 37 open: function() {
38 this.$.dialog.open(); 38 this.$.dialog.showModal();
39 this.browserProxy_.onShowResetProfileDialog(); 39 this.browserProxy_.onShowResetProfileDialog();
40 }, 40 },
41 41
42 /** @private */ 42 /** @private */
43 onCancelTap_: function() { 43 onCancelTap_: function() {
44 this.$.dialog.cancel(); 44 this.$.dialog.cancel();
45 }, 45 },
46 46
47 /** @private */ 47 /** @private */
48 onResetTap_: function() { 48 onResetTap_: function() {
49 this.clearingInProgress_ = true; 49 this.clearingInProgress_ = true;
50 this.browserProxy_.performResetProfileSettings( 50 this.browserProxy_.performResetProfileSettings(
51 this.$.sendSettings.checked).then(function() { 51 this.$.sendSettings.checked).then(function() {
52 this.clearingInProgress_ = false; 52 this.clearingInProgress_ = false;
53 this.$.dialog.close(); 53 this.$.dialog.close();
54 this.dispatchEvent(new CustomEvent('reset-done')); 54 this.dispatchEvent(new CustomEvent('reset-done'));
55 }.bind(this)); 55 }.bind(this));
56 }, 56 },
57 57
58 /** 58 /**
59 * Displays the settings that will be reported in a new tab. 59 * Displays the settings that will be reported in a new tab.
60 * @private 60 * @private
61 */ 61 */
62 onShowReportedSettingsTap_: function() { 62 onShowReportedSettingsTap_: function() {
63 this.browserProxy_.showReportedSettings(); 63 this.browserProxy_.showReportedSettings();
64 }, 64 },
65 }); 65 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698