| 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-main' displays the selected settings page. | 7 * 'settings-main' displays the selected settings page. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * The current active route. | 31 * The current active route. |
| 32 */ | 32 */ |
| 33 currentRoute: { | 33 currentRoute: { |
| 34 type: Object, | 34 type: Object, |
| 35 notify: true, | 35 notify: true, |
| 36 observer: 'currentRouteChanged_', | 36 observer: 'currentRouteChanged_', |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 // If false the 'basic' page should be shown. | 39 /** @private */ |
| 40 showAdvancedPage_: { | 40 showAdvancedPage_: Boolean, |
| 41 type: Boolean, | 41 |
| 42 value: false | 42 /** @private */ |
| 43 } | 43 showBasicPage_: Boolean, |
| 44 |
| 45 /** @private */ |
| 46 showAboutPage_: Boolean, |
| 44 }, | 47 }, |
| 45 | 48 |
| 46 /** @private */ | 49 /** |
| 47 currentRouteChanged_: function(newRoute, oldRoute) { | 50 * @param {!SettingsRoute} newRoute |
| 51 * @private |
| 52 */ |
| 53 currentRouteChanged_: function(newRoute) { |
| 54 this.showAboutPage_ = newRoute.page == 'about'; |
| 48 this.showAdvancedPage_ = newRoute.page == 'advanced'; | 55 this.showAdvancedPage_ = newRoute.page == 'advanced'; |
| 56 this.showBasicPage_ = newRoute.page == 'basic'; |
| 49 }, | 57 }, |
| 50 }); | 58 }); |
| OLD | NEW |