OLD | NEW |
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 * @group Chrome Settings Elements | 10 * @group Chrome Settings Elements |
(...skipping 10 matching lines...) Expand all Loading... |
21 cr.define('SettingsResetPage', function() { | 21 cr.define('SettingsResetPage', function() { |
22 return { | 22 return { |
23 doneResetting: function() { | 23 doneResetting: function() { |
24 this.$.resetSpinner.active = false; | 24 this.$.resetSpinner.active = false; |
25 this.$.dialog.close(); | 25 this.$.dialog.close(); |
26 this.dispatchResetDoneEvent(); | 26 this.dispatchResetDoneEvent(); |
27 }.bind(this), | 27 }.bind(this), |
28 | 28 |
29 setFeedbackInfo: function(data) { | 29 setFeedbackInfo: function(data) { |
30 this.set('feedbackInfo_', data.feedbackInfo); | 30 this.set('feedbackInfo_', data.feedbackInfo); |
31 this.async(function() { | |
32 this.$.dialog.center(); | |
33 }); | |
34 }.bind(this), | 31 }.bind(this), |
35 }; | 32 }; |
36 }.bind(this)); | 33 }.bind(this)); |
37 }, | 34 }, |
38 | 35 |
39 dispatchResetDoneEvent: function() { | 36 dispatchResetDoneEvent: function() { |
40 this.dispatchEvent(new CustomEvent('reset-done')); | 37 this.dispatchEvent(new CustomEvent('reset-done')); |
41 }, | 38 }, |
42 | 39 |
43 open: function() { | 40 open: function() { |
(...skipping 14 matching lines...) Expand all Loading... |
58 }, | 55 }, |
59 | 56 |
60 /** @private */ | 57 /** @private */ |
61 onSendSettingsChange_: function() { | 58 onSendSettingsChange_: function() { |
62 // TODO(dpapad): Update how settings info is surfaced when final mocks | 59 // TODO(dpapad): Update how settings info is surfaced when final mocks |
63 // exist. | 60 // exist. |
64 this.$.settings.hidden = !this.$.sendSettings.checked; | 61 this.$.settings.hidden = !this.$.sendSettings.checked; |
65 this.$.dialog.center(); | 62 this.$.dialog.center(); |
66 }, | 63 }, |
67 }); | 64 }); |
OLD | NEW |