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

Side by Side Diff: chrome/browser/resources/settings/on_startup_page/startup_url_entry.js

Issue 2422993005: MD Settings: Migrate startup URL action menu to settings-action-menu. (Closed)
Patch Set: Nit. Created 4 years, 2 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 10
(...skipping 18 matching lines...) Expand all
29 * @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.
30 * @return {string} A set of icon URLs. 30 * @return {string} A set of icon URLs.
31 * @private 31 * @private
32 */ 32 */
33 getIconSet_: function(url) { 33 getIconSet_: function(url) {
34 return cr.icon.getFavicon(url); 34 return cr.icon.getFavicon(url);
35 }, 35 },
36 36
37 /** @private */ 37 /** @private */
38 onRemoveTap_: function() { 38 onRemoveTap_: function() {
39 this.$$('iron-dropdown').close(); 39 this.$$('dialog[is=settings-action-menu]').close();
40 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage( 40 settings.StartupUrlsPageBrowserProxyImpl.getInstance().removeStartupPage(
41 this.model.modelIndex); 41 this.model.modelIndex);
42 }, 42 },
43 43
44 /** @private */ 44 /** @private */
45 onEditTap_: function() { 45 onEditTap_: function() {
46 this.$$('iron-dropdown').close(); 46 this.$$('dialog[is=settings-action-menu]').close();
47 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); 47 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model);
48 }, 48 },
49
50 /** @private */
51 onDotsTap_: function() {
52 var actionMenu = /** @type {!SettingsActionMenuElement} */(
53 this.$.menu.get());
54 actionMenu.showAt(assert(this.$.dots));
55 },
49 }); 56 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698