Chromium Code Reviews| 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-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: |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 showPowerwashDialog_: Boolean, | 26 showPowerwashDialog_: Boolean, |
| 27 </if> | 27 </if> |
| 28 | 28 |
| 29 /** @private */ | 29 /** @private */ |
| 30 allowPowerwash_: { | 30 allowPowerwash_: { |
| 31 type: Boolean, | 31 type: Boolean, |
| 32 value: cr.isChromeOS ? loadTimeData.getBoolean('allowPowerwash') : false | 32 value: cr.isChromeOS ? loadTimeData.getBoolean('allowPowerwash') : false |
| 33 }, | 33 }, |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 /** @protected */ | 36 /** |
| 37 currentRouteChanged: function() { | 37 * settings.RouteObserverBehavior |
| 38 if (settings.getCurrentRoute() == settings.Route.RESET_DIALOG) { | 38 * @param {!settings.Route} route |
| 39 this.$.resetProfileDialog.get().open(); | 39 * @protected |
| 40 */ | |
| 41 currentRouteChanged: function(route) { | |
|
Dan Beam
2016/09/28 04:34:52
nit:
var isTriggered = route == settings.Route.TR
alito
2016/09/28 05:15:01
Done.
| |
| 42 if (route == settings.Route.RESET_DIALOG || | |
| 43 route == settings.Route.TRIGGERED_RESET_DIALOG) { | |
| 44 this.$.resetProfileDialog.get().open( | |
| 45 /* isTriggered */ route == settings.Route.TRIGGERED_RESET_DIALOG); | |
| 40 } | 46 } |
| 41 }, | 47 }, |
| 42 | 48 |
| 43 /** @private */ | 49 /** @private */ |
| 44 onShowResetProfileDialog_: function() { | 50 onShowResetProfileDialog_: function() { |
| 45 settings.navigateTo(settings.Route.RESET_DIALOG); | 51 settings.navigateTo(settings.Route.RESET_DIALOG); |
| 46 }, | 52 }, |
| 47 | 53 |
| 48 /** @private */ | 54 /** @private */ |
| 49 onResetProfileDialogClose_: function() { | 55 onResetProfileDialogClose_: function() { |
| 50 settings.navigateToPreviousRoute(); | 56 settings.navigateToPreviousRoute(); |
| 51 }, | 57 }, |
| 52 | 58 |
| 53 <if expr="chromeos"> | 59 <if expr="chromeos"> |
| 54 /** @private */ | 60 /** @private */ |
| 55 onShowPowerwashDialog_: function() { | 61 onShowPowerwashDialog_: function() { |
| 56 this.showPowerwashDialog_ = true; | 62 this.showPowerwashDialog_ = true; |
| 57 }, | 63 }, |
| 58 | 64 |
| 59 /** @private */ | 65 /** @private */ |
| 60 onPowerwashDialogClose_: function() { | 66 onPowerwashDialogClose_: function() { |
| 61 this.showPowerwashDialog_ = false; | 67 this.showPowerwashDialog_ = false; |
| 62 }, | 68 }, |
| 63 </if> | 69 </if> |
| 64 }); | 70 }); |
| OLD | NEW |