OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.supervisedUserOptions', function() { | 5 cr.define('options.supervisedUserOptions', 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 * @constructor | 91 * @constructor |
92 * @extends {cr.ui.List} | 92 * @extends {cr.ui.List} |
93 */ | 93 */ |
94 var SupervisedUserList = cr.ui.define('list'); | 94 var SupervisedUserList = cr.ui.define('list'); |
95 | 95 |
96 SupervisedUserList.prototype = { | 96 SupervisedUserList.prototype = { |
97 __proto__: List.prototype, | 97 __proto__: List.prototype, |
98 | 98 |
99 /** @override */ | 99 /** @override */ |
100 createItem: function(entry) { | 100 createItem: function(entry) { |
101 return new SupervisedUserListItem(entry); | 101 return new SupervisedUserListItem(/** @type {Object} */(entry)); |
102 }, | 102 }, |
103 | 103 |
104 /** @override */ | 104 /** @override */ |
105 decorate: function() { | 105 decorate: function() { |
106 List.prototype.decorate.call(this); | 106 List.prototype.decorate.call(this); |
107 this.selectionModel = new ListSingleSelectionModel(); | 107 this.selectionModel = new ListSingleSelectionModel(); |
108 this.autoExpands = true; | 108 this.autoExpands = true; |
109 }, | 109 }, |
110 }; | 110 }; |
111 | 111 |
112 return { | 112 return { |
113 SupervisedUserListItem: SupervisedUserListItem, | 113 SupervisedUserListItem: SupervisedUserListItem, |
114 SupervisedUserList: SupervisedUserList, | 114 SupervisedUserList: SupervisedUserList, |
115 }; | 115 }; |
116 }); | 116 }); |
OLD | NEW |