| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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-subpage' shows a subpage beneath a subheader. The header contains | 7 * 'settings-subpage' shows a subpage beneath a subheader. The header contains |
| 8 * the subpage title and a back icon. The back icon fires an event which | 8 * the subpage title and a back icon. |
| 9 * is caught by settings-animated-pages, so it requires no separate handling. | |
| 10 */ | 9 */ |
| 11 | 10 |
| 12 Polymer({ | 11 Polymer({ |
| 13 is: 'settings-subpage', | 12 is: 'settings-subpage', |
| 14 | 13 |
| 15 behaviors: [ | 14 behaviors: [ |
| 16 // TODO(michaelpg): phase out NeonAnimatableBehavior. | 15 // TODO(michaelpg): phase out NeonAnimatableBehavior. |
| 17 Polymer.NeonAnimatableBehavior, | 16 Polymer.NeonAnimatableBehavior, |
| 18 Polymer.IronResizableBehavior, | 17 Polymer.IronResizableBehavior, |
| 19 ], | 18 ], |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 * @type {?HTMLElement} | 36 * @type {?HTMLElement} |
| 38 */ | 37 */ |
| 39 associatedControl: { | 38 associatedControl: { |
| 40 type: Object, | 39 type: Object, |
| 41 value: null, | 40 value: null, |
| 42 }, | 41 }, |
| 43 }, | 42 }, |
| 44 | 43 |
| 45 /** @private */ | 44 /** @private */ |
| 46 onTapBack_: function() { | 45 onTapBack_: function() { |
| 47 // Event is caught by settings-animated-pages. | 46 settings.navigateTo(assert(settings.getCurrentRoute().parent)); |
| 48 this.fire('subpage-back'); | |
| 49 }, | 47 }, |
| 50 | 48 |
| 51 /** @private */ | 49 /** @private */ |
| 52 onSearchChanged_: function(e) { | 50 onSearchChanged_: function(e) { |
| 53 this.searchTerm = e.detail; | 51 this.searchTerm = e.detail; |
| 54 }, | 52 }, |
| 55 }); | 53 }); |
| OLD | NEW |