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

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

Issue 2373613003: md-settings: add routing to chrome://settings/resetProfileSettings. (Closed)
Patch Set: Fixed missing gyp dependency Created 4 years, 2 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-page' is the settings page containing reset 7 * 'settings-reset-page' is the settings page containing reset
8 * settings. 8 * settings.
9 * 9 *
10 * Example: 10 * Example:
11 * 11 *
12 * <iron-animated-pages> 12 * <iron-animated-pages>
13 * <settings-reset-page prefs="{{prefs}}"> 13 * <settings-reset-page prefs="{{prefs}}">
14 * </settings-reset-page> 14 * </settings-reset-page>
15 * ... other pages ... 15 * ... other pages ...
16 * </iron-animated-pages> 16 * </iron-animated-pages>
17 */ 17 */
18 Polymer({ 18 Polymer({
19 is: 'settings-reset-page', 19 is: 'settings-reset-page',
20 20
21 behaviors: [settings.RouteObserverBehavior],
22
21 properties: { 23 properties: {
22 <if expr="chromeos"> 24 <if expr="chromeos">
23 /** @private */ 25 /** @private */
24 showPowerwashDialog_: Boolean, 26 showPowerwashDialog_: Boolean,
25 </if> 27 </if>
26 28
27 /** @private */ 29 /** @private */
28 allowPowerwash_: { 30 allowPowerwash_: {
29 type: Boolean, 31 type: Boolean,
30 value: cr.isChromeOS ? loadTimeData.getBoolean('allowPowerwash') : false 32 value: cr.isChromeOS ? loadTimeData.getBoolean('allowPowerwash') : false
31 }, 33 },
32 }, 34 },
33 35
36 /** @protected */
37 currentRouteChanged: function() {
38 if (settings.getCurrentRoute() == settings.Route.RESET_DIALOG) {
39 this.$.resetProfileDialog.get().open();
40 }
41 },
42
34 /** @private */ 43 /** @private */
35 onShowResetProfileDialog_: function() { 44 onShowResetProfileDialog_: function() {
36 this.$.resetProfileDialog.get().open(); 45 settings.navigateTo(settings.Route.RESET_DIALOG);
46 },
47
48 /** @private */
49 onResetProfileDialogClose_: function() {
50 settings.navigateToPreviousRoute();
37 }, 51 },
38 52
39 <if expr="chromeos"> 53 <if expr="chromeos">
40 /** @private */ 54 /** @private */
41 onShowPowerwashDialog_: function() { 55 onShowPowerwashDialog_: function() {
42 this.showPowerwashDialog_ = true; 56 this.showPowerwashDialog_ = true;
43 }, 57 },
44 58
45 /** @private */ 59 /** @private */
46 onPowerwashDialogClose_: function() { 60 onPowerwashDialogClose_: function() {
47 this.showPowerwashDialog_ = false; 61 this.showPowerwashDialog_ = false;
48 }, 62 },
49 </if> 63 </if>
50 }); 64 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/reset_page/reset_page.html ('k') | chrome/browser/resources/settings/route.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698