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

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

Issue 183893028: Use a correct scale factor for Gaia avatar images (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only return an imageset for an actual image set Created 6 years, 9 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
« no previous file with comments | « chrome/browser/resources/options/managed_user_list.js ('k') | ui/webui/resources/js/util.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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', function() { 5 cr.define('options', function() {
6 /** @const */ var ListItem = cr.ui.ListItem; 6 /** @const */ var ListItem = cr.ui.ListItem;
7 /** @const */ var Grid = cr.ui.Grid; 7 /** @const */ var Grid = cr.ui.Grid;
8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 /** 10 /**
(...skipping 19 matching lines...) Expand all
30 }; 30 };
31 31
32 ProfilesIconGridItem.prototype = { 32 ProfilesIconGridItem.prototype = {
33 __proto__: ListItem.prototype, 33 __proto__: ListItem.prototype,
34 34
35 /** @override */ 35 /** @override */
36 decorate: function() { 36 decorate: function() {
37 ListItem.prototype.decorate.call(this); 37 ListItem.prototype.decorate.call(this);
38 var imageEl = cr.doc.createElement('img'); 38 var imageEl = cr.doc.createElement('img');
39 imageEl.className = 'profile-icon'; 39 imageEl.className = 'profile-icon';
40 imageEl.style.content = imageset(this.iconURL_ + '@scalefactorx'); 40 imageEl.style.content = getProfileAvatarIcon(this.iconURL_);
41 this.appendChild(imageEl); 41 this.appendChild(imageEl);
42 42
43 this.className = 'profile-icon-grid-item'; 43 this.className = 'profile-icon-grid-item';
44 }, 44 },
45 }; 45 };
46 46
47 var ProfilesIconGrid = cr.ui.define('grid'); 47 var ProfilesIconGrid = cr.ui.define('grid');
48 48
49 ProfilesIconGrid.prototype = { 49 ProfilesIconGrid.prototype = {
50 __proto__: Grid.prototype, 50 __proto__: Grid.prototype,
51 51
52 /** @override */ 52 /** @override */
53 decorate: function() { 53 decorate: function() {
54 Grid.prototype.decorate.call(this); 54 Grid.prototype.decorate.call(this);
55 this.selectionModel = new ListSingleSelectionModel(); 55 this.selectionModel = new ListSingleSelectionModel();
56 }, 56 },
57 57
58 /** @override */ 58 /** @override */
59 createItem: function(iconURL) { 59 createItem: function(iconURL) {
60 return new ProfilesIconGridItem(iconURL); 60 return new ProfilesIconGridItem(iconURL);
61 }, 61 },
62 }; 62 };
63 63
64 return { 64 return {
65 ProfilesIconGrid: ProfilesIconGrid 65 ProfilesIconGrid: ProfilesIconGrid
66 }; 66 };
67 }); 67 });
68
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/managed_user_list.js ('k') | ui/webui/resources/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698