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
3 // found in the LICENSE file.
5 TaskManagerCommands = {
7 * Sends commands to kill selected processes.
9 killSelectedProcesses: function(uniqueIds) {
10 chrome.send('killProcesses', uniqueIds);
14 * Sends command to initiate resource inspection.
16 inspect: function(uniqueId) {
17 chrome.send('inspect', [uniqueId]);
21 * Sends command to open about memory tab.
23 openAboutMemory: function() {
24 chrome.send('openAboutMemory');
28 * Sends command to disable taskmanager model.
30 disableTaskManager: function() {
31 chrome.send('disableTaskManager');
35 * Sends command to enable taskmanager model.
37 enableTaskManager: function() {
38 chrome.send('enableTaskManager');
42 * Sends command to activate a page.
44 activatePage: function(uniqueId) {
45 chrome.send('activatePage', [uniqueId]);
49 * Sends command to enable or disable the given columns to update the data.
51 setUpdateColumn: function(columnId, isEnabled) {
52 chrome.send('setUpdateColumn', [columnId, isEnabled]);
54 // The 'title' column contains the icon.
55 if (columnId == 'title')
56 chrome.send('setUpdateColumn', ['icon', isEnabled]);