OLD | NEW |
| (Empty) |
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. | |
4 | |
5 TaskManagerCommands = { | |
6 /** | |
7 * Sends commands to kill selected processes. | |
8 */ | |
9 killSelectedProcesses: function(uniqueIds) { | |
10 chrome.send('killProcesses', uniqueIds); | |
11 }, | |
12 | |
13 /** | |
14 * Sends command to initiate resource inspection. | |
15 */ | |
16 inspect: function(uniqueId) { | |
17 chrome.send('inspect', [uniqueId]); | |
18 }, | |
19 | |
20 /** | |
21 * Sends command to open about memory tab. | |
22 */ | |
23 openAboutMemory: function() { | |
24 chrome.send('openAboutMemory'); | |
25 }, | |
26 | |
27 /** | |
28 * Sends command to disable taskmanager model. | |
29 */ | |
30 disableTaskManager: function() { | |
31 chrome.send('disableTaskManager'); | |
32 }, | |
33 | |
34 /** | |
35 * Sends command to enable taskmanager model. | |
36 */ | |
37 enableTaskManager: function() { | |
38 chrome.send('enableTaskManager'); | |
39 }, | |
40 | |
41 /** | |
42 * Sends command to activate a page. | |
43 */ | |
44 activatePage: function(uniqueId) { | |
45 chrome.send('activatePage', [uniqueId]); | |
46 }, | |
47 | |
48 /** | |
49 * Sends command to enable or disable the given columns to update the data. | |
50 */ | |
51 setUpdateColumn: function(columnId, isEnabled) { | |
52 chrome.send('setUpdateColumn', [columnId, isEnabled]); | |
53 | |
54 // The 'title' column contains the icon. | |
55 if (columnId == 'title') | |
56 chrome.send('setUpdateColumn', ['icon', isEnabled]); | |
57 } | |
58 }; | |
OLD | NEW |