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 28 matching lines...) Expand all Loading... |
39 }, | 39 }, |
40 }, | 40 }, |
41 | 41 |
42 /** | 42 /** |
43 * settings.RouteObserverBehavior | 43 * settings.RouteObserverBehavior |
44 * @param {!settings.Route} route | 44 * @param {!settings.Route} route |
45 * @protected | 45 * @protected |
46 */ | 46 */ |
47 currentRouteChanged: function(route) { | 47 currentRouteChanged: function(route) { |
48 this.showResetProfileDialog_ = | 48 this.showResetProfileDialog_ = |
49 route == settings.Route.TRIGGERED_RESET_DIALOG || | 49 route == settings.routes.TRIGGERED_RESET_DIALOG || |
50 route == settings.Route.RESET_DIALOG; | 50 route == settings.routes.RESET_DIALOG; |
51 }, | 51 }, |
52 | 52 |
53 /** @private */ | 53 /** @private */ |
54 onShowResetProfileDialog_: function() { | 54 onShowResetProfileDialog_: function() { |
55 settings.navigateTo( | 55 settings.navigateTo( |
56 settings.Route.RESET_DIALOG, new URLSearchParams('origin=userclick')); | 56 settings.routes.RESET_DIALOG, new URLSearchParams('origin=userclick')); |
57 }, | 57 }, |
58 | 58 |
59 /** @private */ | 59 /** @private */ |
60 onResetProfileDialogClose_: function() { | 60 onResetProfileDialogClose_: function() { |
61 settings.navigateToPreviousRoute(); | 61 settings.navigateToPreviousRoute(); |
62 cr.ui.focusWithoutInk(assert(this.$.resetProfileArrow)); | 62 cr.ui.focusWithoutInk(assert(this.$.resetProfileArrow)); |
63 }, | 63 }, |
64 | 64 |
65 // <if expr="chromeos"> | 65 // <if expr="chromeos"> |
66 /** | 66 /** |
67 * @param {!Event} e | 67 * @param {!Event} e |
68 * @private | 68 * @private |
69 */ | 69 */ |
70 onShowPowerwashDialog_: function(e) { | 70 onShowPowerwashDialog_: function(e) { |
71 e.preventDefault(); | 71 e.preventDefault(); |
72 this.showPowerwashDialog_ = true; | 72 this.showPowerwashDialog_ = true; |
73 }, | 73 }, |
74 | 74 |
75 /** @private */ | 75 /** @private */ |
76 onPowerwashDialogClose_: function() { | 76 onPowerwashDialogClose_: function() { |
77 this.showPowerwashDialog_ = false; | 77 this.showPowerwashDialog_ = false; |
78 cr.ui.focusWithoutInk(assert(this.$.powerwashArrow)); | 78 cr.ui.focusWithoutInk(assert(this.$.powerwashArrow)); |
79 }, | 79 }, |
80 // </if> | 80 // </if> |
81 }); | 81 }); |
OLD | NEW |