| 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 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return cr.icon.getFavicon(url); | 39 return cr.icon.getFavicon(url); |
| 40 }, | 40 }, |
| 41 | 41 |
| 42 /** @private */ | 42 /** @private */ |
| 43 onRemoveTap_: function() { | 43 onRemoveTap_: function() { |
| 44 this.$$('dialog[is=cr-action-menu]').close(); | 44 this.$$('dialog[is=cr-action-menu]').close(); |
| 45 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage( | 45 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage( |
| 46 this.model.modelIndex); | 46 this.model.modelIndex); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 /** @private */ | 49 /** |
| 50 onEditTap_: function() { | 50 * @param {!Event} e |
| 51 * @private |
| 52 */ |
| 53 onEditTap_: function(e) { |
| 54 e.preventDefault(); |
| 51 this.$$('dialog[is=cr-action-menu]').close(); | 55 this.$$('dialog[is=cr-action-menu]').close(); |
| 52 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); | 56 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); |
| 53 }, | 57 }, |
| 54 | 58 |
| 55 /** @private */ | 59 /** @private */ |
| 56 onDotsTap_: function() { | 60 onDotsTap_: function() { |
| 57 var actionMenu = /** @type {!CrActionMenuElement} */( | 61 var actionMenu = /** @type {!CrActionMenuElement} */( |
| 58 this.$$('#menu').get()); | 62 this.$$('#menu').get()); |
| 59 actionMenu.showAt(assert(this.$$('#dots'))); | 63 actionMenu.showAt(assert(this.$$('#dots'))); |
| 60 }, | 64 }, |
| 61 }); | 65 }); |
| OLD | NEW |