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

Side by Side Diff: ui/webui/resources/js/cr/ui/list_item.js

Issue 475633006: Typecheck JS files for chrome://extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@D_asserts_codingconvention
Patch Set: looked twice Created 6 years, 4 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
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('cr.ui', function() { 5 cr.define('cr.ui', function() {
6 6
7 /** 7 /**
8 * Creates a new list item element. 8 * Creates a new list item element.
9 * @param {string} opt_label The text label for the item. 9 * @param {string} opt_label The text label for the item.
10 * @constructor 10 * @constructor
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 /** 42 /**
43 * Called when the selection state of this element changes. 43 * Called when the selection state of this element changes.
44 */ 44 */
45 selectionChanged: function() { 45 selectionChanged: function() {
46 }, 46 },
47 }; 47 };
48 48
49 /** 49 /**
50 * Whether the item is selected. Setting this does not update the underlying 50 * Whether the item is selected. Setting this does not update the underlying
51 * selection model. This is only used for display purpose. 51 * selection model. This is only used for display purpose.
52 * @type {boolean}
53 */ 52 */
54 cr.defineProperty(ListItem, 'selected', cr.PropertyKind.BOOL_ATTR, 53 cr.defineProperty(ListItem, 'selected', cr.PropertyKind.BOOL_ATTR,
55 function() { 54 function() {
56 this.selectionChanged(); 55 this.selectionChanged();
57 }); 56 });
58 57
59 /** 58 /**
60 * Whether the item is the lead in a selection. Setting this does not update 59 * Whether the item is the lead in a selection. Setting this does not update
61 * the underlying selection model. This is only used for display purpose. 60 * the underlying selection model. This is only used for display purpose.
62 * @type {boolean}
63 */ 61 */
64 cr.defineProperty(ListItem, 'lead', cr.PropertyKind.BOOL_ATTR); 62 cr.defineProperty(ListItem, 'lead', cr.PropertyKind.BOOL_ATTR);
65 63
66 /** 64 /**
67 * This item's index in the containing list. 65 * This item's index in the containing list.
68 * @type {number} 66 * type {number}
69 */ 67 */
70 cr.defineProperty(ListItem, 'listIndex'); 68 cr.defineProperty(ListItem, 'listIndex');
71 69
72 return { 70 return {
73 ListItem: ListItem 71 ListItem: ListItem
74 }; 72 };
75 }); 73 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698