OLD | NEW |
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 /** |
11 * Create a new managed user list item. | 11 * Create a new managed user list item. |
12 * @param {Object} entry The managed user this item represents. | 12 * @param {Object} entry The managed user this item represents. |
13 * It has the following form: | 13 * It has the following form: |
14 * managedUser = { | 14 * managedUser = { |
15 * id: "Managed User ID", | 15 * id: "Managed User ID", |
16 * name: "Managed User Name", | 16 * name: "Managed User Name", |
17 * iconURL: "chrome://path/to/icon/image", | 17 * iconURL: "chrome://path/to/icon/image", |
18 * onCurrentDevice: true or false | 18 * onCurrentDevice: true or false, |
| 19 * needAvatar: true or false |
19 * } | 20 * } |
20 * @constructor | 21 * @constructor |
21 * @extends {cr.ui.ListItem} | 22 * @extends {cr.ui.ListItem} |
22 */ | 23 */ |
23 function ManagedUserListItem(entry) { | 24 function ManagedUserListItem(entry) { |
24 var el = cr.doc.createElement('div'); | 25 var el = cr.doc.createElement('div'); |
25 el.managedUser_ = entry; | 26 el.managedUser_ = entry; |
26 el.__proto__ = ManagedUserListItem.prototype; | 27 el.__proto__ = ManagedUserListItem.prototype; |
27 el.decorate(); | 28 el.decorate(); |
28 return el; | 29 return el; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 this.selectionModel = new ListSingleSelectionModel(); | 107 this.selectionModel = new ListSingleSelectionModel(); |
107 this.autoExpands = true; | 108 this.autoExpands = true; |
108 }, | 109 }, |
109 }; | 110 }; |
110 | 111 |
111 return { | 112 return { |
112 ManagedUserListItem: ManagedUserListItem, | 113 ManagedUserListItem: ManagedUserListItem, |
113 ManagedUserList: ManagedUserList, | 114 ManagedUserList: ManagedUserList, |
114 }; | 115 }; |
115 }); | 116 }); |
OLD | NEW |