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

Side by Side Diff: chrome/browser/resources/task_manager/main.js

Issue 8341046: Make Background pages highlighted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @constructor */ 5 /** @constructor */
6 function TaskManager() { } 6 function TaskManager() { }
7 7
8 cr.addSingletonGetter(TaskManager); 8 cr.addSingletonGetter(TaskManager);
9 9
10 /* 10 /*
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 // Sets custom row render function. 238 // Sets custom row render function.
239 this.table_.setRenderFunction(this.renderRow_.bind(this)); 239 this.table_.setRenderFunction(this.renderRow_.bind(this));
240 }, 240 },
241 241
242 renderRow_: function(dataItem, table) { 242 renderRow_: function(dataItem, table) {
243 var cm = table.columnModel; 243 var cm = table.columnModel;
244 var listItem = new cr.ui.ListItem({label: ''}); 244 var listItem = new cr.ui.ListItem({label: ''});
245 245
246 listItem.className = 'table-row'; 246 listItem.className = 'table-row';
247 if (this.opt_.isBackgroundMode_ && dataItem.isBackgroundResource) 247 if (this.opt_.isBackgroundMode && dataItem.isBackgroundResource)
248 listItem.className += ' table-background-row'; 248 listItem.className += ' table-background-row';
249 249
250 for (var i = 0; i < cm.size; i++) { 250 for (var i = 0; i < cm.size; i++) {
251 var cell = document.createElement('div'); 251 var cell = document.createElement('div');
252 cell.style.width = cm.getWidth(i) + '%'; 252 cell.style.width = cm.getWidth(i) + '%';
253 cell.className = 'table-row-cell'; 253 cell.className = 'table-row-cell';
254 cell.appendChild( 254 cell.appendChild(
255 cm.getRenderFunction(i).call(null, dataItem, cm.getId(i), table)); 255 cm.getRenderFunction(i).call(null, dataItem, cm.getId(i), table));
256 256
257 listItem.appendChild(cell); 257 listItem.appendChild(cell);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 taskmanager.onTaskChange(start, length, tasks); 405 taskmanager.onTaskChange(start, length, tasks);
406 } 406 }
407 407
408 function taskRemoved(start, length) { 408 function taskRemoved(start, length) {
409 // Sometimes this can get called too early. 409 // Sometimes this can get called too early.
410 if (!taskmanager) 410 if (!taskmanager)
411 return; 411 return;
412 taskmanager.onTaskRemove(start, length); 412 taskmanager.onTaskRemove(start, length);
413 } 413 }
414 414
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698