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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/list_item.js

Issue 5935003: DOMUI: Implement new-style password manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 10 years 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 12 matching lines...) Expand all
23 return this.textContent; 23 return this.textContent;
24 }, 24 },
25 set label(label) { 25 set label(label) {
26 this.textContent = label; 26 this.textContent = label;
27 }, 27 },
28 28
29 /** 29 /**
30 * Called when an element is decorated as a list item. 30 * Called when an element is decorated as a list item.
31 */ 31 */
32 decorate: function() { 32 decorate: function() {
33 } 33 },
34
35 /**
36 * Called when the selection state of this element changes.
37 */
38 selectionChanged: function() {
arv (Not doing code reviews) 2010/12/17 20:07:34 I think a better way is to change the current sele
James Hawkins 2010/12/17 21:32:40 Ok, I think I've made the change like you've sugge
39 },
34 }; 40 };
35 41
36 /** 42 /**
37 * Whether the item is selected. Setting this does not update the underlying 43 * Whether the item is selected. Setting this does not update the underlying
38 * selection model. This is only used for display purpose. 44 * selection model. This is only used for display purpose.
39 * @type {boolean} 45 * @type {boolean}
40 */ 46 */
41 cr.defineProperty(ListItem, 'selected', cr.PropertyKind.BOOL_ATTR); 47 cr.defineProperty(ListItem, 'selected', cr.PropertyKind.BOOL_ATTR);
42 48
43 /** 49 /**
44 * Whether the item is the lead in a selection. Setting this does not update 50 * Whether the item is the lead in a selection. Setting this does not update
45 * the underlying selection model. This is only used for display purpose. 51 * the underlying selection model. This is only used for display purpose.
46 * @type {boolean} 52 * @type {boolean}
47 */ 53 */
48 cr.defineProperty(ListItem, 'lead', cr.PropertyKind.BOOL_ATTR); 54 cr.defineProperty(ListItem, 'lead', cr.PropertyKind.BOOL_ATTR);
49 55
50 return { 56 return {
51 ListItem: ListItem 57 ListItem: ListItem
52 }; 58 };
53 }); 59 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698