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

Side by Side Diff: chrome/browser/resources/options/managed_user_list.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.managedUserOptions', function() { 5 cr.define('options.managedUserOptions', function() {
6 /** @const */ var List = cr.ui.List; 6 /** @const */ var List = cr.ui.List;
7 /** @const */ var ListItem = cr.ui.ListItem; 7 /** @const */ var ListItem = cr.ui.ListItem;
8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 /** 10 /**
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }, 55 },
56 56
57 /** @override */ 57 /** @override */
58 decorate: function() { 58 decorate: function() {
59 ListItem.prototype.decorate.call(this); 59 ListItem.prototype.decorate.call(this);
60 var managedUser = this.managedUser_; 60 var managedUser = this.managedUser_;
61 61
62 // Add the avatar. 62 // Add the avatar.
63 var iconElement = this.ownerDocument.createElement('img'); 63 var iconElement = this.ownerDocument.createElement('img');
64 iconElement.className = 'profile-img'; 64 iconElement.className = 'profile-img';
65 iconElement.style.content = 65 iconElement.style.content = getProfileAvatarIcon(managedUser.iconURL);
66 imageset(managedUser.iconURL + '@scalefactorx');
67 this.appendChild(iconElement); 66 this.appendChild(iconElement);
68 67
69 // Add the profile name. 68 // Add the profile name.
70 var nameElement = this.ownerDocument.createElement('div'); 69 var nameElement = this.ownerDocument.createElement('div');
71 nameElement.className = 'profile-name'; 70 nameElement.className = 'profile-name';
72 nameElement.textContent = managedUser.name; 71 nameElement.textContent = managedUser.name;
73 this.appendChild(nameElement); 72 this.appendChild(nameElement);
74 73
75 if (managedUser.onCurrentDevice) { 74 if (managedUser.onCurrentDevice) {
76 iconElement.className += ' profile-img-disabled'; 75 iconElement.className += ' profile-img-disabled';
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 this.selectionModel = new ListSingleSelectionModel(); 107 this.selectionModel = new ListSingleSelectionModel();
109 this.autoExpands = true; 108 this.autoExpands = true;
110 }, 109 },
111 }; 110 };
112 111
113 return { 112 return {
114 ManagedUserListItem: ManagedUserListItem, 113 ManagedUserListItem: ManagedUserListItem,
115 ManagedUserList: ManagedUserList, 114 ManagedUserList: ManagedUserList,
116 }; 115 };
117 }); 116 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/manage_profile_overlay.js ('k') | chrome/browser/resources/options/profiles_icon_grid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698