Chromium Code Reviews| 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 * 'all-sites' is the polymer element for showing the list of all sites under | 7 * 'user-manager-pages' is the element that controls paging in the user manager |
| 8 * Site Settings. | 8 * screen. |
|
Dan Beam
2016/02/25 16:44:39
don't wrap after @fileoverview
Moe
2016/03/02 18:03:18
Done.
| |
| 9 * | 9 * |
| 10 * @group Chrome Settings Elements | 10 * Example: |
| 11 * @element all-sites | 11 * |
| 12 * <user-manager-pages selected-page="sample-page-id"> | |
| 13 * <sample-page id="sample-page-id"></sample-page> | |
| 14 * ... other pages ... | |
| 15 * </user-manager-pages> | |
| 16 * | |
| 17 * @element user-manager-pages | |
|
Dan Beam
2016/02/25 16:44:39
just remove Example: to the end of this comment
Moe
2016/03/02 18:03:18
Done.
| |
| 12 */ | 18 */ |
| 13 Polymer({ | 19 Polymer({ |
| 14 is: 'all-sites', | 20 is: 'user-manager-pages', |
| 15 | |
| 16 behaviors: [SiteSettingsBehavior], | |
| 17 | 21 |
| 18 properties: { | 22 properties: { |
| 19 /** | 23 /** |
| 20 * Preferences state. | 24 * id of the currently selected page. |
|
Dan Beam
2016/02/25 16:44:39
ID
Moe
2016/03/02 18:03:18
Done.
| |
| 25 * @type {boolean} | |
| 21 */ | 26 */ |
| 22 prefs: { | 27 selectedPage: { |
| 23 type: Object, | 28 type: String, |
| 24 notify: true, | 29 } |
| 25 }, | 30 }, |
| 26 | 31 |
| 27 /** | 32 /** @override */ |
| 28 * The current active route. | 33 attached: function() { |
| 29 */ | 34 this.addEventListener('change-page', function(e) { |
| 30 currentRoute: { | 35 this.selectedPage = e.detail.page; |
| 31 type: Object, | 36 }.bind(this)); |
| 32 notify: true, | 37 } |
| 33 }, | |
| 34 | |
| 35 /** | |
| 36 * The origin that was selected by the user in the dropdown list. | |
| 37 */ | |
| 38 selectedOrigin: { | |
| 39 type: String, | |
| 40 notify: true, | |
| 41 }, | |
| 42 }, | |
| 43 }); | 38 }); |
| OLD | NEW |