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

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

Issue 2848973003: MD Settings: convert paper-icon-button to paper-icon-button-light. (Closed)
Patch Set: feedback Created 3 years, 6 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 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }, 78 },
79 79
80 /** @private */ 80 /** @private */
81 onDeleteTap_: function() { 81 onDeleteTap_: function() {
82 this.browserProxy_.removeSearchEngine(this.engine.modelIndex); 82 this.browserProxy_.removeSearchEngine(this.engine.modelIndex);
83 this.closePopupMenu_(); 83 this.closePopupMenu_();
84 }, 84 },
85 85
86 /** @private */ 86 /** @private */
87 onDotsTap_: function() { 87 onDotsTap_: function() {
88 /** @type {!CrActionMenuElement} */ ( 88 /** @type {!CrActionMenuElement} */ (this.$$('dialog[is=cr-action-menu]'))
89 this.$$('dialog[is=cr-action-menu]')).showAt( 89 .showAt(assert(this.$$('button[is="paper-icon-button-light"]')));
90 assert(this.$$('paper-icon-button')));
91 }, 90 },
92 91
93 /** 92 /**
94 * @param {!Event} e 93 * @param {!Event} e
95 * @private 94 * @private
96 */ 95 */
97 onEditTap_: function(e) { 96 onEditTap_: function(e) {
98 e.preventDefault(); 97 e.preventDefault();
99 this.closePopupMenu_(); 98 this.closePopupMenu_();
100 99
101 this.showEditSearchEngineDialog_ = true; 100 this.showEditSearchEngineDialog_ = true;
102 this.async(function() { 101 this.async(function() {
103 var dialog = this.$$('settings-search-engine-dialog'); 102 var dialog = this.$$('settings-search-engine-dialog');
104 // Register listener to detect when the dialog is closed. Flip the boolean 103 // Register listener to detect when the dialog is closed. Flip the boolean
105 // once closed to force a restamp next time it is shown such that the 104 // once closed to force a restamp next time it is shown such that the
106 // previous dialog's contents are cleared. 105 // previous dialog's contents are cleared.
107 dialog.addEventListener('close', function() { 106 dialog.addEventListener('close', function() {
108 this.showEditSearchEngineDialog_ = false; 107 this.showEditSearchEngineDialog_ = false;
109 cr.ui.focusWithoutInk(assert(this.$$('paper-icon-button'))); 108 cr.ui.focusWithoutInk(assert(this.$$(
109 'button[is="paper-icon-button-light"]')));
110 }.bind(this)); 110 }.bind(this));
111 }.bind(this)); 111 }.bind(this));
112 }, 112 },
113 113
114 /** @private */ 114 /** @private */
115 onMakeDefaultTap_: function() { 115 onMakeDefaultTap_: function() {
116 this.closePopupMenu_(); 116 this.closePopupMenu_();
117 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex); 117 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex);
118 }, 118 },
119 }); 119 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698