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

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

Issue 2280853002: Slightly nicer icon.js APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 = cr.icon.getFaviconImageSet( 60 titleEl.style.backgroundImage = cr.icon.getFavicon(pageInfo.url);
61 pageInfo.url);
62 titleEl.title = pageInfo.tooltip; 61 titleEl.title = pageInfo.tooltip;
63 } 62 }
64 63
65 this.contentElement.appendChild(titleEl); 64 this.contentElement.appendChild(titleEl);
66 65
67 var urlEl = this.createEditableTextCell(pageInfo.url); 66 var urlEl = this.createEditableTextCell(pageInfo.url);
68 urlEl.className = 'url'; 67 urlEl.className = 'url';
69 urlEl.classList.add('weakrtl'); 68 urlEl.classList.add('weakrtl');
70 this.contentElement.appendChild(urlEl); 69 this.contentElement.appendChild(urlEl);
71 70
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 this.hideDropMarkerTimer_ = window.setTimeout(function() { 312 this.hideDropMarkerTimer_ = window.setTimeout(function() {
314 $('startupPagesListDropmarker').style.display = ''; 313 $('startupPagesListDropmarker').style.display = '';
315 }, 100); 314 }, 100);
316 }, 315 },
317 }; 316 };
318 317
319 return { 318 return {
320 StartupPageList: StartupPageList 319 StartupPageList: StartupPageList
321 }; 320 };
322 }); 321 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698