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

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

Issue 9956170: WebUI TaskManager: Sort by CPU Usage on open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the last CRLF. Created 8 years, 8 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
« no previous file with comments | « chrome/browser/resources/task_manager/defines.js ('k') | 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) 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 var localStrings = new LocalStrings(); 10 var localStrings = new LocalStrings();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 var aValues = a[columnIdToSort]; 136 var aValues = a[columnIdToSort];
137 var bValues = b[columnIdToSort]; 137 var bValues = b[columnIdToSort];
138 var aValue = aValues && aValues[0] || 0; 138 var aValue = aValues && aValues[0] || 0;
139 var bvalue = bValues && bValues[0] || 0; 139 var bvalue = bValues && bValues[0] || 0;
140 return dm.defaultValuesCompareFunction(aValue, bvalue); 140 return dm.defaultValuesCompareFunction(aValue, bvalue);
141 }; 141 };
142 })(); 142 })();
143 dm.setCompareFunction(columnId, compareFunc); 143 dm.setCompareFunction(columnId, compareFunc);
144 } 144 }
145 145
146 if (isColumnEnabled(DEFAULT_SORT_COLUMN))
147 dm.sort(DEFAULT_SORT_COLUMN, DEFAULT_SORT_DIRECTION);
148
146 this.initTable_(); 149 this.initTable_();
147 150
148 commands.enableTaskManager(); 151 commands.enableTaskManager();
149 152
150 // Populate the static localized strings. 153 // Populate the static localized strings.
151 i18nTemplate.process(this.document_, templateData); 154 i18nTemplate.process(this.document_, templateData);
152 155
153 measureTime.recordInterval('Load.DOM'); 156 measureTime.recordInterval('Load.DOM');
154 measureTime.recordInterval('Load.Total'); 157 measureTime.recordInterval('Load.Total');
155 158
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 function init() { 696 function init() {
694 var params = parseQueryParams(window.location); 697 var params = parseQueryParams(window.location);
695 var opt = {}; 698 var opt = {};
696 opt['isBackgroundMode'] = params.background; 699 opt['isBackgroundMode'] = params.background;
697 opt['isShowCloseButton'] = params.showclose; 700 opt['isShowCloseButton'] = params.showclose;
698 taskmanager.initialize(document.body, opt); 701 taskmanager.initialize(document.body, opt);
699 } 702 }
700 703
701 document.addEventListener('DOMContentLoaded', init); 704 document.addEventListener('DOMContentLoaded', init);
702 document.addEventListener('Close', taskmanager.onClose.bind(taskmanager)); 705 document.addEventListener('Close', taskmanager.onClose.bind(taskmanager));
OLDNEW
« no previous file with comments | « chrome/browser/resources/task_manager/defines.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698