Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1040)

Unified Diff: chrome/browser/resources/settings/on_startup_page/startup_url_entry.js

Issue 1882483002: MD Settings: OnStartup, implementing "Edit" functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@edit_on_startup_move_delete
Patch Set: Event name. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+ },
});

Powered by Google App Engine
This is Rietveld 408576698