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

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

Issue 2700863002: MD Settings: adjust focus-outline behaviors on search engine iron-list. (Closed)
Patch Set: use polymer's listeners property instead of addEventListener Created 3 years, 10 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',
11 11
12 behaviors: [FocusableIronListItemBehavior],
13
12 properties: { 14 properties: {
13 /** @type {!SearchEngine} */ 15 /** @type {!SearchEngine} */
14 engine: Object, 16 engine: Object,
15 17
16 /** @type {boolean} */ 18 /** @type {boolean} */
17 isDefault: { 19 isDefault: {
18 reflectToAttribute: true, 20 reflectToAttribute: true,
19 type: Boolean, 21 type: Boolean,
20 computed: 'computeIsDefault_(engine)' 22 computed: 'computeIsDefault_(engine)'
21 }, 23 },
22 24
23 /** @private {boolean} */ 25 /** @private {boolean} */
24 showDots_: { 26 showDots_: {
25 reflectToAttribute: true, 27 reflectToAttribute: true,
26 type: Boolean, 28 type: Boolean,
27 computed: 'computeShowDots_(engine.canBeDefault,' + 29 computed: 'computeShowDots_(engine.canBeDefault,' +
28 'engine.canBeEdited,' + 30 'engine.canBeEdited,' +
29 'engine.canBeRemoved)', 31 'engine.canBeRemoved)',
30 }, 32 },
31 33
32 /** @private {boolean} */ 34 /** @private {boolean} */
33 showEditSearchEngineDialog_: Boolean, 35 showEditSearchEngineDialog_: Boolean,
34 }, 36 },
35 37
38
hcarmona 2017/02/17 23:35:37 nit: remove the \n
scottchen 2017/02/22 07:07:06 Done.
36 /** @private {settings.SearchEnginesBrowserProxy} */ 39 /** @private {settings.SearchEnginesBrowserProxy} */
37 browserProxy_: null, 40 browserProxy_: null,
38 41
39 /** @override */ 42 /** @override */
40 created: function() { 43 created: function() {
41 this.browserProxy_ = settings.SearchEnginesBrowserProxyImpl.getInstance(); 44 this.browserProxy_ = settings.SearchEnginesBrowserProxyImpl.getInstance();
42 }, 45 },
43 46
44 /** @private */ 47 /** @private */
45 closePopupMenu_: function() { 48 closePopupMenu_: function() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 }.bind(this)); 110 }.bind(this));
108 }.bind(this)); 111 }.bind(this));
109 }, 112 },
110 113
111 /** @private */ 114 /** @private */
112 onMakeDefaultTap_: function() { 115 onMakeDefaultTap_: function() {
113 this.closePopupMenu_(); 116 this.closePopupMenu_();
114 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex); 117 this.browserProxy_.setDefaultSearchEngine(this.engine.modelIndex);
115 }, 118 },
116 }); 119 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698