OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options.search_engines', function() { | 5 cr.define('options.search_engines', function() { |
6 /** @const */ var ControlledSettingIndicator = | 6 /** @const */ var ControlledSettingIndicator = |
7 options.ControlledSettingIndicator; | 7 options.ControlledSettingIndicator; |
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; | 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; |
9 /** @const */ var InlineEditableItem = options.InlineEditableItem; | 9 /** @const */ var InlineEditableItem = options.InlineEditableItem; |
10 /** @const */ var ListSelectionController = cr.ui.ListSelectionController; | 10 /** @const */ var ListSelectionController = cr.ui.ListSelectionController; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 var nameColEl = this.ownerDocument.createElement('div'); | 93 var nameColEl = this.ownerDocument.createElement('div'); |
94 nameColEl.className = 'name-column'; | 94 nameColEl.className = 'name-column'; |
95 nameColEl.classList.add('weakrtl'); | 95 nameColEl.classList.add('weakrtl'); |
96 this.contentElement.appendChild(nameColEl); | 96 this.contentElement.appendChild(nameColEl); |
97 | 97 |
98 // Add the favicon. | 98 // Add the favicon. |
99 var faviconDivEl = this.ownerDocument.createElement('div'); | 99 var faviconDivEl = this.ownerDocument.createElement('div'); |
100 faviconDivEl.className = 'favicon'; | 100 faviconDivEl.className = 'favicon'; |
101 if (!this.isPlaceholder) { | 101 if (!this.isPlaceholder) { |
102 faviconDivEl.style.backgroundImage = | 102 faviconDivEl.style.backgroundImage = |
103 url('chrome://favicon/iconurl@' + window.devicePixelRatio + 'x/' + | 103 imageset('chrome://favicon/iconurl@scalefactorx/' + engine.iconURL); |
104 engine.iconURL); | |
105 } | 104 } |
106 nameColEl.appendChild(faviconDivEl); | 105 nameColEl.appendChild(faviconDivEl); |
107 | 106 |
108 var nameEl = this.createEditableTextCell(engine.displayName); | 107 var nameEl = this.createEditableTextCell(engine.displayName); |
109 nameEl.classList.add('weakrtl'); | 108 nameEl.classList.add('weakrtl'); |
110 nameColEl.appendChild(nameEl); | 109 nameColEl.appendChild(nameEl); |
111 | 110 |
112 // Then the keyword column. | 111 // Then the keyword column. |
113 var keywordEl = this.createEditableTextCell(engine.keyword); | 112 var keywordEl = this.createEditableTextCell(engine.keyword); |
114 keywordEl.className = 'keyword-column'; | 113 keywordEl.className = 'keyword-column'; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 }, | 318 }, |
320 }; | 319 }; |
321 | 320 |
322 // Export | 321 // Export |
323 return { | 322 return { |
324 SearchEngineList: SearchEngineList | 323 SearchEngineList: SearchEngineList |
325 }; | 324 }; |
326 | 325 |
327 }); | 326 }); |
328 | 327 |
OLD | NEW |