| 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 settings-startup-url-entry represents a UI component that | 6 * @fileoverview settings-startup-url-entry represents a UI component that |
| 7 * displayes a URL that is loaded during startup. It includes a menu that allows | 7 * displayes a URL that is loaded during startup. It includes a menu that allows |
| 8 * the user to edit/remove the entry. | 8 * the user to edit/remove the entry. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 cr.exportPath('settings'); | 11 cr.exportPath('settings'); |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * The name of the event fired from this element when the "Edit" option is | 14 * The name of the event fired from this element when the "Edit" option is |
| 15 * tapped. | 15 * tapped. |
| 16 * @const {string} | 16 * @const {string} |
| 17 */ | 17 */ |
| 18 settings.EDIT_STARTUP_URL_EVENT = 'edit-startup-url'; | 18 settings.EDIT_STARTUP_URL_EVENT = 'edit-startup-url'; |
| 19 | 19 |
| 20 Polymer({ | 20 Polymer({ |
| 21 is: 'settings-startup-url-entry', | 21 is: 'settings-startup-url-entry', |
| 22 | 22 |
| 23 behaviors: [FocusRowBehavior], |
| 24 |
| 23 properties: { | 25 properties: { |
| 24 editable: { | 26 editable: { |
| 25 type: Boolean, | 27 type: Boolean, |
| 26 reflectToAttribute: true, | 28 reflectToAttribute: true, |
| 27 }, | 29 }, |
| 28 | 30 |
| 29 /** @type {!StartupPageInfo} */ | 31 /** @type {!StartupPageInfo} */ |
| 30 model: Object, | 32 model: Object, |
| 31 }, | 33 }, |
| 32 | 34 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 56 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); | 58 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); |
| 57 }, | 59 }, |
| 58 | 60 |
| 59 /** @private */ | 61 /** @private */ |
| 60 onDotsTap_: function() { | 62 onDotsTap_: function() { |
| 61 var actionMenu = /** @type {!CrActionMenuElement} */( | 63 var actionMenu = /** @type {!CrActionMenuElement} */( |
| 62 this.$$('#menu').get()); | 64 this.$$('#menu').get()); |
| 63 actionMenu.showAt(assert(this.$$('#dots'))); | 65 actionMenu.showAt(assert(this.$$('#dots'))); |
| 64 }, | 66 }, |
| 65 }); | 67 }); |
| OLD | NEW |