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

Side by Side 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: Nit. 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 unified diff | Download patch
OLDNEW
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
11 cr.exportPath('settings');
12
13 /**
14 * The name of the event fired from this element when the "Edit" option is
15 * tapped.
16 * @const {string}
17 */
18 settings.EDIT_STARTUP_URL_EVENT = 'edit-startup-url';
19
10 Polymer({ 20 Polymer({
11 is: 'settings-startup-url-entry', 21 is: 'settings-startup-url-entry',
12 22
13 properties: { 23 properties: {
14 /** @type {!StartupPageInfo} */ 24 /** @type {!StartupPageInfo} */
15 model: Object, 25 model: Object,
16 }, 26 },
17 27
18 /** 28 /**
19 * @param {string} url Location of an image to get a set of icons for. 29 * @param {string} url Location of an image to get a set of icons for.
20 * @return {string} A set of icon URLs. 30 * @return {string} A set of icon URLs.
21 * @private 31 * @private
22 */ 32 */
23 getIconSet_: function(url) { 33 getIconSet_: function(url) {
24 return getFaviconImageSet(url); 34 return getFaviconImageSet(url);
25 }, 35 },
26 36
27 /** @private */ 37 /** @private */
28 onRemoveTap_: function() { 38 onRemoveTap_: function() {
39 this.$$('iron-dropdown').close();
29 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage( 40 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage(
30 this.model.modelIndex); 41 this.model.modelIndex);
31 }, 42 },
43
44 /** @private */
45 onEditTap_: function() {
46 this.$$('iron-dropdown').close();
47 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model);
48 },
32 }); 49 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698