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

Side by Side Diff: chrome/browser/resources/suggestions_internals/suggestions_internals.js

Issue 11787015: Allow the password manager in the settings page to have hidpi favicons too (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 11 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 /** 5 /**
6 * Javascript for suggestions_internals.html, served from 6 * Javascript for suggestions_internals.html, served from
7 * chrome://suggestions-internals/. This is used to debug suggestions ranking. 7 * chrome://suggestions-internals/. This is used to debug suggestions ranking.
8 * When loaded, the page will show the current set of suggestions, along with a 8 * When loaded, the page will show the current set of suggestions, along with a
9 * large set of information (e.g. all the signals that were taken into 9 * large set of information (e.g. all the signals that were taken into
10 * consideration for deciding which pages were selected to be shown to the user) 10 * consideration for deciding which pages were selected to be shown to the user)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 } else if (column_name == 'rank') { 158 } else if (column_name == 'rank') {
159 column.innerText = rank++; 159 column.innerText = rank++;
160 } else if (column_name == 'screenshot') { 160 } else if (column_name == 'screenshot') {
161 var thumbnailUrl = 'chrome://thumb/' + entry.url; 161 var thumbnailUrl = 'chrome://thumb/' + entry.url;
162 var img = document.createElement('img'); 162 var img = document.createElement('img');
163 img.onload = function() { setBooleanColumn(column, true); } 163 img.onload = function() { setBooleanColumn(column, true); }
164 img.onerror = function() { setBooleanColumn(column, false); } 164 img.onerror = function() { setBooleanColumn(column, false); }
165 img.src = thumbnailUrl; 165 img.src = thumbnailUrl;
166 } else if (column_name == 'favicon') { 166 } else if (column_name == 'favicon') {
167 var faviconUrl = 'chrome://favicon/size/16/' + entry.url; 167 var faviconUrl = 'chrome://favicon/size/16@1x/' + entry.url;
168 column.style.backgroundImage = url(faviconUrl); 168 column.style.backgroundImage = url(faviconUrl);
169 column.style.backgroundRepeat = 'no-repeat'; 169 column.style.backgroundRepeat = 'no-repeat';
170 column.style.backgroundPosition = 'center center'; 170 column.style.backgroundPosition = 'center center';
171 } 171 }
172 row.appendChild(column); 172 row.appendChild(column);
173 }); 173 });
174 table.appendChild(row); 174 table.appendChild(row);
175 }); 175 });
176 176
177 output.appendChild(table); 177 output.appendChild(table);
178 } 178 }
179 179
180 return { 180 return {
181 initialize: initialize, 181 initialize: initialize,
182 setSuggestions: setSuggestions 182 setSuggestions: setSuggestions
183 }; 183 };
184 }); 184 });
185 185
186 document.addEventListener('DOMContentLoaded', suggestionsInternals.initialize); 186 document.addEventListener('DOMContentLoaded', suggestionsInternals.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/search_engine_manager_engine_list.js ('k') | chrome/browser/ui/webui/favicon_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698