| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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-search-engine-entry' is a component for showing a | 6 * @fileoverview 'settings-search-engine-entry' is a component for showing a |
| 7 * search engine with its name, domain and query URL. | 7 * search engine with its name, domain and query URL. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-search-engine-entry', | 10 is: 'settings-search-engine-entry', |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** @private */ | 65 /** @private */ |
| 66 onMakeDefaultTap_: function() { | 66 onMakeDefaultTap_: function() { |
| 67 this.closePopupMenu_(); | 67 this.closePopupMenu_(); |
| 68 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex); | 68 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex); |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 /** @private */ | 71 /** @private */ |
| 72 closePopupMenu_: function() { | 72 closePopupMenu_: function() { |
| 73 this.$$('dialog[is=settings-action-menu]').close(); | 73 this.$$('dialog[is=cr-action-menu]').close(); |
| 74 }, | 74 }, |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @param {?string} url The icon URL if available. | 77 * @param {?string} url The icon URL if available. |
| 78 * @return {string} A set of icon URLs. | 78 * @return {string} A set of icon URLs. |
| 79 * @private | 79 * @private |
| 80 */ | 80 */ |
| 81 getIconSet_: function(url) { | 81 getIconSet_: function(url) { |
| 82 // Force default icon, if no |engine.iconURL| is available. | 82 // Force default icon, if no |engine.iconURL| is available. |
| 83 return cr.icon.getFavicon(url || ''); | 83 return cr.icon.getFavicon(url || ''); |
| 84 }, | 84 }, |
| 85 | 85 |
| 86 /** @private */ | 86 /** @private */ |
| 87 onDotsTap_: function() { | 87 onDotsTap_: function() { |
| 88 /** @type {!SettingsActionMenuElement} */ ( | 88 /** @type {!CrActionMenuElement} */ ( |
| 89 this.$$('dialog[is=settings-action-menu]')).showAt( | 89 this.$$('dialog[is=cr-action-menu]')).showAt( |
| 90 assert(this.$$('paper-icon-button'))); | 90 assert(this.$$('paper-icon-button'))); |
| 91 }, | 91 }, |
| 92 }); | 92 }); |
| OLD | NEW |