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

Side by Side Diff: chrome/browser/resources/options/search_engine_manager_engine_list.js

Issue 10909236: Add support for favicon scale factor in WebUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix HandleGetFaviconDominantColor. Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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 InlineEditableItemList = options.InlineEditableItemList; 6 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
7 /** @const */ var InlineEditableItem = options.InlineEditableItem; 7 /** @const */ var InlineEditableItem = options.InlineEditableItem;
8 /** @const */ var ListSelectionController = cr.ui.ListSelectionController; 8 /** @const */ var ListSelectionController = cr.ui.ListSelectionController;
9 9
10 /** 10 /**
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // Construct the name column. 90 // Construct the name column.
91 var nameColEl = this.ownerDocument.createElement('div'); 91 var nameColEl = this.ownerDocument.createElement('div');
92 nameColEl.className = 'name-column'; 92 nameColEl.className = 'name-column';
93 nameColEl.classList.add('weakrtl'); 93 nameColEl.classList.add('weakrtl');
94 this.contentElement.appendChild(nameColEl); 94 this.contentElement.appendChild(nameColEl);
95 95
96 // Add the favicon. 96 // Add the favicon.
97 var faviconDivEl = this.ownerDocument.createElement('div'); 97 var faviconDivEl = this.ownerDocument.createElement('div');
98 faviconDivEl.className = 'favicon'; 98 faviconDivEl.className = 'favicon';
99 var imgEl = this.ownerDocument.createElement('img'); 99 if (!this.isPlaceholder) {
100 imgEl.src = 'chrome://favicon/iconurl/' + engine.iconURL; 100 faviconDivEl.style.backgroundImage =
101 faviconDivEl.appendChild(imgEl); 101 url('chrome://favicon/iconurl@' + window.devicePixelRatio + 'x/' +
102 engine.iconURL);
103 }
102 nameColEl.appendChild(faviconDivEl); 104 nameColEl.appendChild(faviconDivEl);
103 105
104 var nameEl = this.createEditableTextCell(engine.displayName); 106 var nameEl = this.createEditableTextCell(engine.displayName);
105 nameEl.classList.add('weakrtl'); 107 nameEl.classList.add('weakrtl');
106 nameColEl.appendChild(nameEl); 108 nameColEl.appendChild(nameEl);
107 109
108 // Then the keyword column. 110 // Then the keyword column.
109 var keywordEl = this.createEditableTextCell(engine.keyword); 111 var keywordEl = this.createEditableTextCell(engine.keyword);
110 keywordEl.className = 'keyword-column'; 112 keywordEl.className = 'keyword-column';
111 keywordEl.classList.add('weakrtl'); 113 keywordEl.classList.add('weakrtl');
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 }, 308 },
307 }; 309 };
308 310
309 // Export 311 // Export
310 return { 312 return {
311 SearchEngineList: SearchEngineList 313 SearchEngineList: SearchEngineList
312 }; 314 };
313 315
314 }); 316 });
315 317
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/search_engine_manager.css ('k') | chrome/browser/resources/shared/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698