Chromium Code Reviews| Index: chrome/browser/resources/settings/on_startup_page/startup_url_entry.js |
| diff --git a/chrome/browser/resources/settings/on_startup_page/startup_url_entry.js b/chrome/browser/resources/settings/on_startup_page/startup_url_entry.js |
| index 087f1e9ab1466ab97231c3783c2c3bcc8c920d2e..c111c5b7d325b9fdc5f2c61edd98e71f30b598ca 100644 |
| --- a/chrome/browser/resources/settings/on_startup_page/startup_url_entry.js |
| +++ b/chrome/browser/resources/settings/on_startup_page/startup_url_entry.js |
| @@ -7,6 +7,20 @@ |
| * displayes a URL that is loaded during startup. It includes a menu that allows |
| * the user to edit/remove the entry. |
| */ |
| + |
| +cr.define('settings', function() { |
| + /** |
| + * The name of the event fired from this element when the "Edit" option is |
| + * tapped. |
| + * @type {string} |
| + */ |
| + var EditStartupUrlEvent = 'edit-startup-url'; |
| + |
| + return { |
| + EditStartupUrlEvent: EditStartupUrlEvent, |
| + }; |
| +}); |
|
dschuyler
2016/04/14 00:49:38
Can the above be simplified?
dpapad
2016/04/14 01:13:39
First, I added a compile target for this to ensure
Dan Beam
2016/04/14 01:32:30
cr.exportPath('settings');
/** @type {string} */
dpapad
2016/04/14 01:50:53
Done the simplification. Also changed to @const an
|
| + |
| Polymer({ |
| is: 'settings-startup-url-entry', |
| @@ -26,7 +40,14 @@ Polymer({ |
| /** @private */ |
| onRemoveTap_: function() { |
| + this.$$('iron-dropdown').close(); |
| settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage( |
| this.model.modelIndex); |
| }, |
| + |
| + /** @private */ |
| + onEditTap_: function() { |
| + this.$$('iron-dropdown').close(); |
| + this.fire(settings.EditStartupUrlEvent, this.model); |
| + }, |
| }); |