Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 /** @constructor */ | 5 /** @constructor */ |
| 6 function TaskManager() { } | 6 function TaskManager() { } |
| 7 | 7 |
| 8 cr.addSingletonGetter(TaskManager); | 8 cr.addSingletonGetter(TaskManager); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 cell.className = 'table-row-cell'; | 491 cell.className = 'table-row-cell'; |
| 492 cell.id = 'column-' + pid + '-' + cm.getId(i); | 492 cell.id = 'column-' + pid + '-' + cm.getId(i); |
| 493 cell.appendChild( | 493 cell.appendChild( |
| 494 cm.getRenderFunction(i).call(null, data, cm.getId(i), table)); | 494 cm.getRenderFunction(i).call(null, data, cm.getId(i), table)); |
| 495 | 495 |
| 496 listItem.appendChild(cell); | 496 listItem.appendChild(cell); |
| 497 | 497 |
| 498 // Stores the cell element to the dictionary. | 498 // Stores the cell element to the dictionary. |
| 499 this.elementsCache_[pid].cell[i] = cell; | 499 this.elementsCache_[pid].cell[i] = cell; |
| 500 } | 500 } |
| 501 | |
| 502 // Specifies the height of the row. The height of each row is | |
| 503 // 'num_of_tasks * 20' px. | |
|
mazda
2012/01/26 11:20:15
Please make a variable for 20.
yoshiki
2012/01/31 11:30:35
Done.
| |
| 504 listItem.style.height = (data['uniqueId'].length * 20) + 'px'; | |
| 505 | |
| 501 listItem.data = data; | 506 listItem.data = data; |
| 502 | 507 |
| 503 // Stores the list item element, the number of columns and the number of | 508 // Stores the list item element, the number of columns and the number of |
| 504 // childlen. | 509 // childlen. |
| 505 this.elementsCache_[pid].listItem = listItem; | 510 this.elementsCache_[pid].listItem = listItem; |
| 506 this.elementsCache_[pid].cachedColumnSize = cm.size; | 511 this.elementsCache_[pid].cachedColumnSize = cm.size; |
| 507 this.elementsCache_[pid].cachedChildSize = data['uniqueId'].length; | 512 this.elementsCache_[pid].cachedChildSize = data['uniqueId'].length; |
| 508 | 513 |
| 509 return listItem; | 514 return listItem; |
| 510 }, | 515 }, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 797 return; | 802 return; |
| 798 taskmanager.onTaskChange(start, length, tasks); | 803 taskmanager.onTaskChange(start, length, tasks); |
| 799 } | 804 } |
| 800 | 805 |
| 801 function taskRemoved(start, length) { | 806 function taskRemoved(start, length) { |
| 802 // Sometimes this can get called too early. | 807 // Sometimes this can get called too early. |
| 803 if (!taskmanager) | 808 if (!taskmanager) |
| 804 return; | 809 return; |
| 805 taskmanager.onTaskRemove(start, length); | 810 taskmanager.onTaskRemove(start, length); |
| 806 } | 811 } |
| OLD | NEW |