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

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

Issue 7606029: WebUI TaskManager: Supports background-page mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
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 /** 5 /**
6 * @fileoverview This implements a table control. 6 * @fileoverview This implements a table control.
7 */ 7 */
8 8
9 cr.define('cr.ui', function() { 9 cr.define('cr.ui', function() {
10 const ListSelectionModel = cr.ui.ListSelectionModel; 10 const ListSelectionModel = cr.ui.ListSelectionModel;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 * @type {boolean} 94 * @type {boolean}
95 */ 95 */
96 get autoExpands() { 96 get autoExpands() {
97 return this.list_.autoExpands; 97 return this.list_.autoExpands;
98 }, 98 },
99 set autoExpands(autoExpands) { 99 set autoExpands(autoExpands) {
100 this.list_.autoExpands = autoExpands; 100 this.list_.autoExpands = autoExpands;
101 }, 101 },
102 102
103 /** 103 /**
104 * Returns render function for row.
105 * @return {Function(*, cr.ui.Table): HTMLElement} Render function.
106 */
107 getRenderFunction: function() {
108 return this.list_.renderFunction_;
109 },
110
111 /**
112 * Sets render function for row.
113 * @param {Function(*, cr.ui.Table): HTMLElement} Render function.
114 */
115 setRenderFunction: function(renderFunction) {
116 if (renderFunction === this.list_.renderFunction_)
117 return;
118
119 this.list_.renderFunction_ = renderFunction;
120 cr.dispatchSimpleEvent(this, 'change');
121 },
122
123 /**
104 * The header of the table. 124 * The header of the table.
105 * 125 *
106 * @type {cr.ui.table.TableColumnModel} 126 * @type {cr.ui.table.TableColumnModel}
107 */ 127 */
108 get header() { 128 get header() {
109 return this.header_; 129 return this.header_;
110 }, 130 },
111 131
112 /** 132 /**
113 * Sets width of the column at the given index. 133 * Sets width of the column at the given index.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 * because table contents can contain controls that can be focused, and for 274 * because table contents can contain controls that can be focused, and for
255 * some purposes (e.g., styling), the table can still be conceptually focused 275 * some purposes (e.g., styling), the table can still be conceptually focused
256 * at that point even though it doesn't actually have the page focus. 276 * at that point even though it doesn't actually have the page focus.
257 */ 277 */
258 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR); 278 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR);
259 279
260 return { 280 return {
261 Table: Table 281 Table: Table
262 }; 282 };
263 }); 283 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698