OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> | 8 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> |
9 <link rel="import" href="/tracing/ui/base/utils.html"> | 9 <link rel="import" href="/tracing/ui/base/utils.html"> |
10 | 10 |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 var index = this.tableColumns.indexOf(column); | 1165 var index = this.tableColumns.indexOf(column); |
1166 if (index < 0) | 1166 if (index < 0) |
1167 throw new Error('Cannot select unknown column', column); | 1167 throw new Error('Cannot select unknown column', column); |
1168 | 1168 |
1169 if (!column.selectable) | 1169 if (!column.selectable) |
1170 throw new Error('Cannot select un-selectable column', column); | 1170 throw new Error('Cannot select un-selectable column', column); |
1171 | 1171 |
1172 var cell = this.headerCells_[index]; | 1172 var cell = this.headerCells_[index]; |
1173 cell.selected = true; | 1173 cell.selected = true; |
1174 } | 1174 } |
1175 var e = new tr.b.Event('selected-column-changed'); | 1175 var event = {column: column, selected: column !== undefined}; |
1176 e.column = column; | 1176 this.onSelectedColumnChanged_(event); |
1177 e.selected = column !== undefined; | 1177 tr.b.dispatchSimpleEvent( |
1178 cell.dispatchEvent(e); | 1178 this, 'selected-column-changed', true, false, event); |
1179 }, | 1179 }, |
1180 | 1180 |
1181 get selectedTableRow() { | 1181 get selectedTableRow() { |
1182 if (!this.selectedTableRowInfo_) | 1182 if (!this.selectedTableRowInfo_) |
1183 return undefined; | 1183 return undefined; |
1184 return this.selectedTableRowInfo_.userRow; | 1184 return this.selectedTableRowInfo_.userRow; |
1185 }, | 1185 }, |
1186 | 1186 |
1187 set selectedTableRow(userRow) { | 1187 set selectedTableRow(userRow) { |
1188 this.rebuildIfNeeded_(); | 1188 this.rebuildIfNeeded_(); |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 get tapCallback() { | 1652 get tapCallback() { |
1653 return this.tapCallback_; | 1653 return this.tapCallback_; |
1654 }, | 1654 }, |
1655 | 1655 |
1656 onTap_: function() { | 1656 onTap_: function() { |
1657 if (this.tapCallback_) | 1657 if (this.tapCallback_) |
1658 this.tapCallback_(); | 1658 this.tapCallback_(); |
1659 } | 1659 } |
1660 }); | 1660 }); |
1661 </script> | 1661 </script> |
OLD | NEW |