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

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

Issue 8394004: [Multi Profile] On Personal Options page, users list should display avatar icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/personal_options.css ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.personal_options', function() { 5 cr.define('options.personal_options', function() {
6 const DeletableItem = options.DeletableItem; 6 const DeletableItem = options.DeletableItem;
7 const DeletableItemList = options.DeletableItemList; 7 const DeletableItemList = options.DeletableItemList;
8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 var localStrings = new LocalStrings(); 10 var localStrings = new LocalStrings();
(...skipping 30 matching lines...) Expand all
41 get profilePath() { 41 get profilePath() {
42 return this.profileInfo_.filePath; 42 return this.profileInfo_.filePath;
43 }, 43 },
44 44
45 /** @inheritDoc */ 45 /** @inheritDoc */
46 decorate: function() { 46 decorate: function() {
47 DeletableItem.prototype.decorate.call(this); 47 DeletableItem.prototype.decorate.call(this);
48 48
49 var profileInfo = this.profileInfo_; 49 var profileInfo = this.profileInfo_;
50 50
51 var nameEl = this.contentElement; 51 var iconEl = this.ownerDocument.createElement('img');
52 nameEl.className = 'profile-item'; 52 iconEl.className = 'profile-img';
53 iconEl.src = profileInfo.iconURL;
54 this.contentElement.appendChild(iconEl);
55
56 var nameEl = this.ownerDocument.createElement('div');
53 if (profileInfo.isCurrentProfile) 57 if (profileInfo.isCurrentProfile)
54 nameEl.classList.add('profile-item-current'); 58 nameEl.classList.add('profile-item-current');
59 this.contentElement.appendChild(nameEl);
55 60
56 var displayName = profileInfo.name; 61 var displayName = profileInfo.name;
57 if (profileInfo.isCurrentProfile) 62 if (profileInfo.isCurrentProfile)
58 displayName = localStrings.getStringF( 63 displayName = localStrings.getStringF(
59 'profilesListItemCurrent', 64 'profilesListItemCurrent',
60 profileInfo.name) 65 profileInfo.name)
61 nameEl.textContent = displayName; 66 nameEl.textContent = displayName;
62 }, 67 },
63 }; 68 };
64 69
(...skipping 23 matching lines...) Expand all
88 activateItemAtIndex: function(index) { 93 activateItemAtIndex: function(index) {
89 ManageProfileOverlay.showManageDialog(this.dataModel.item(index)); 94 ManageProfileOverlay.showManageDialog(this.dataModel.item(index));
90 }, 95 },
91 }; 96 };
92 97
93 return { 98 return {
94 ProfileList: ProfileList 99 ProfileList: ProfileList
95 }; 100 };
96 }); 101 });
97 102
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/personal_options.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698