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

Side by Side Diff: chrome/browser/resources/settings/search_engines_page/search_engine_entry.js

Issue 2425423005: MD Settings: Close action menu when search engine is removed. (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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/search_engines_page_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/search_engines_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698