| 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 25 matching lines...) Expand all Loading... |
| 36 * @return {boolean} | 36 * @return {boolean} |
| 37 * @private | 37 * @private |
| 38 */ | 38 */ |
| 39 computeIsDefault_: function() { | 39 computeIsDefault_: function() { |
| 40 return this.engine.default; | 40 return this.engine.default; |
| 41 }, | 41 }, |
| 42 | 42 |
| 43 /** @private */ | 43 /** @private */ |
| 44 onDeleteTap_: function() { | 44 onDeleteTap_: function() { |
| 45 this.browserProxy_.removeSearchEngine(this.engine.modelIndex); | 45 this.browserProxy_.removeSearchEngine(this.engine.modelIndex); |
| 46 this.closePopupMenu_(); |
| 46 }, | 47 }, |
| 47 | 48 |
| 48 /** @private */ | 49 /** @private */ |
| 49 onEditTap_: function() { | 50 onEditTap_: function() { |
| 50 this.closePopupMenu_(); | 51 this.closePopupMenu_(); |
| 51 | 52 |
| 52 this.showEditSearchEngineDialog_ = true; | 53 this.showEditSearchEngineDialog_ = true; |
| 53 this.async(function() { | 54 this.async(function() { |
| 54 var dialog = this.$$('settings-search-engine-dialog'); | 55 var dialog = this.$$('settings-search-engine-dialog'); |
| 55 // Register listener to detect when the dialog is closed. Flip the boolean | 56 // Register listener to detect when the dialog is closed. Flip the boolean |
| (...skipping 26 matching lines...) Expand all Loading... |
| 82 return cr.icon.getFavicon(url || ''); | 83 return cr.icon.getFavicon(url || ''); |
| 83 }, | 84 }, |
| 84 | 85 |
| 85 /** @private */ | 86 /** @private */ |
| 86 onDotsTap_: function() { | 87 onDotsTap_: function() { |
| 87 /** @type {!SettingsActionMenuElement} */ ( | 88 /** @type {!SettingsActionMenuElement} */ ( |
| 88 this.$$('dialog[is=settings-action-menu]')).showAt( | 89 this.$$('dialog[is=settings-action-menu]')).showAt( |
| 89 assert(this.$$('paper-icon-button'))); | 90 assert(this.$$('paper-icon-button'))); |
| 90 }, | 91 }, |
| 91 }); | 92 }); |
| OLD | NEW |