| OLD | NEW |
| 1 // Copyright 2015 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-subheader' shows a subheader for subpages. This 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. The back icon fires an event which |
| 9 * is caught by settings-animated-pages, so it requires no separate handling. | 9 * is caught by settings-animated-pages, so it requires no separate handling. |
| 10 * | |
| 11 * Examples: | |
| 12 * | |
| 13 * <settings-subheader i18n-values="page-title:internetPageTitle"> | |
| 14 * </settings-subheader> | |
| 15 */ | 10 */ |
| 11 |
| 16 Polymer({ | 12 Polymer({ |
| 17 is: 'settings-subheader', | 13 is: 'settings-subpage', |
| 14 |
| 15 behaviors: [ |
| 16 // TODO(michaelpg): phase out NeonAnimatableBehavior. |
| 17 Polymer.NeonAnimatableBehavior, |
| 18 Polymer.IronResizableBehavior, |
| 19 ], |
| 20 |
| 21 properties: { |
| 22 pageTitle: String, |
| 23 }, |
| 18 | 24 |
| 19 /** @private */ | 25 /** @private */ |
| 20 onTapBack_: function() { | 26 onTapBack_: function() { |
| 21 // Event is caught by settings-animated-pages. | 27 // Event is caught by settings-animated-pages. |
| 22 this.fire('subpage-back'); | 28 this.fire('subpage-back'); |
| 23 }, | 29 }, |
| 24 }); | 30 }); |
| OLD | NEW |