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

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

Issue 10909236: Add support for favicon scale factor in WebUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use high-DPI icons for search engine dialog. 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.browser_options', function() { 5 cr.define('options.browser_options', function() {
6 /** @const */ var AutocompleteList = cr.ui.AutocompleteList; 6 /** @const */ var AutocompleteList = cr.ui.AutocompleteList;
7 /** @const */ var InlineEditableItem = options.InlineEditableItem; 7 /** @const */ var InlineEditableItem = options.InlineEditableItem;
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
9 9
10 /** 10 /**
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 pageInfo.title = loadTimeData.getString('startupAddLabel'); 50 pageInfo.title = loadTimeData.getString('startupAddLabel');
51 pageInfo.url = ''; 51 pageInfo.url = '';
52 } 52 }
53 53
54 var titleEl = this.ownerDocument.createElement('div'); 54 var titleEl = this.ownerDocument.createElement('div');
55 titleEl.className = 'title'; 55 titleEl.className = 'title';
56 titleEl.classList.add('favicon-cell'); 56 titleEl.classList.add('favicon-cell');
57 titleEl.classList.add('weakrtl'); 57 titleEl.classList.add('weakrtl');
58 titleEl.textContent = pageInfo.title; 58 titleEl.textContent = pageInfo.title;
59 if (!this.isPlaceholder) { 59 if (!this.isPlaceholder) {
60 titleEl.style.backgroundImage = url('chrome://favicon/' + pageInfo.url); 60 titleEl.style.backgroundImage = url('chrome://favicon/size/16@' +
61 window.devicePixelRatio + 'x/' +
62 pageInfo.url);
61 titleEl.title = pageInfo.tooltip; 63 titleEl.title = pageInfo.tooltip;
62 } 64 }
63 65
64 this.contentElement.appendChild(titleEl); 66 this.contentElement.appendChild(titleEl);
65 67
66 var urlEl = this.createEditableTextCell(pageInfo.url); 68 var urlEl = this.createEditableTextCell(pageInfo.url);
67 urlEl.className = 'url'; 69 urlEl.className = 'url';
68 urlEl.classList.add('weakrtl'); 70 urlEl.classList.add('weakrtl');
69 this.contentElement.appendChild(urlEl); 71 this.contentElement.appendChild(urlEl);
70 72
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 this.hideDropMarkerTimer_ = window.setTimeout(function() { 302 this.hideDropMarkerTimer_ = window.setTimeout(function() {
301 $('startupPagesListDropmarker').style.display = ''; 303 $('startupPagesListDropmarker').style.display = '';
302 }, 100); 304 }, 100);
303 }, 305 },
304 }; 306 };
305 307
306 return { 308 return {
307 StartupPageList: StartupPageList 309 StartupPageList: StartupPageList
308 }; 310 };
309 }); 311 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698