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

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_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 // TODO(arv): Now that this is driven by a data model, implement a data model 5 // TODO(arv): Now that this is driven by a data model, implement a data model
6 // that handles the loading and the events from the bookmark backend. 6 // that handles the loading and the events from the bookmark backend.
7 7
8 cr.define('bmm', function() { 8 cr.define('bmm', function() {
9 var List = cr.ui.List; 9 var List = cr.ui.List;
10 var ListItem = cr.ui.ListItem; 10 var ListItem = cr.ui.ListItem;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 var labelEl = this.ownerDocument.createElement('div'); 382 var labelEl = this.ownerDocument.createElement('div');
383 labelEl.className = 'label'; 383 labelEl.className = 'label';
384 labelEl.textContent = bookmarkNode.title; 384 labelEl.textContent = bookmarkNode.title;
385 385
386 var urlEl = this.ownerDocument.createElement('div'); 386 var urlEl = this.ownerDocument.createElement('div');
387 urlEl.className = 'url'; 387 urlEl.className = 'url';
388 388
389 if (bmm.isFolder(bookmarkNode)) { 389 if (bmm.isFolder(bookmarkNode)) {
390 this.className = 'folder'; 390 this.className = 'folder';
391 } else { 391 } else {
392 labelEl.style.backgroundImage = url('chrome://favicon/' + 392 labelEl.style.backgroundImage = url('chrome://favicon/size/16@' +
393 window.devicePixelRatio + 'x/' +
393 bookmarkNode.url); 394 bookmarkNode.url);
395 labelEl.style.backgroundSize = '16px';
394 urlEl.textContent = bookmarkNode.url; 396 urlEl.textContent = bookmarkNode.url;
395 } 397 }
396 398
397 this.appendChild(labelEl); 399 this.appendChild(labelEl);
398 this.appendChild(urlEl); 400 this.appendChild(urlEl);
399 401
400 // Initially the ContextMenuButton was added here but it slowed down 402 // Initially the ContextMenuButton was added here but it slowed down
401 // rendering a lot so it is now added using mouseover. 403 // rendering a lot so it is now added using mouseover.
402 }, 404 },
403 405
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 568 }
567 } 569 }
568 } 570 }
569 }; 571 };
570 572
571 return { 573 return {
572 BookmarkList: BookmarkList, 574 BookmarkList: BookmarkList,
573 list: list 575 list: list
574 }; 576 };
575 }); 577 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/history/history.js » ('j') | chrome/browser/resources/history/history.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698