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 [ | 5 [ |
6 { | 6 { |
7 "namespace": "experimental.processes", | 7 "namespace": "experimental.processes", |
8 "nodoc": true, | |
9 "types": [ | 8 "types": [ |
10 { | 9 { |
11 "id": "Process", | 10 "id": "Process", |
12 "type": "object", | 11 "type": "object", |
13 "description": "An object containing information about one of the browse r's processes.", | 12 "description": "An object containing information about one of the browse r's processes.", |
14 "properties": { | 13 "properties": { |
15 "id": { | 14 "id": { |
16 "type": "integer", | 15 "type": "integer", |
16 "description": "Unique ID of the process provided by Chrome" | |
Charlie Reis
2012/04/27 22:01:56
Nit: end with period.
Note: we'll want to make a
nasko
2012/04/30 18:05:19
Yes, I agree and the reason I didn't make a real e
| |
17 }, | |
18 "osProcessId": { | |
19 "type": "integer", | |
17 "description": "The ID of the process, as provided by the OS." | 20 "description": "The ID of the process, as provided by the OS." |
18 }, | 21 }, |
19 "type": { | 22 "type": { |
20 "type": "string", | 23 "type": "string", |
21 "enum": ["browser", "renderer", "extension", "notification", "plugin ", "worker", "nacl", "utility", "gpu", "other"], | 24 "enum": ["browser", "renderer", "extension", "notification", "plugin ", "worker", "nacl", "utility", "gpu", "other"], |
22 "description": "The type of process." | 25 "description": "The type of process." |
23 }, | 26 }, |
27 "profile": { | |
28 "type": "string", | |
29 "description": "The profile which the process is associated with." | |
30 }, | |
31 "tabs": { | |
32 "type": "array", "items": {"type": "integer", "minimum": 0}, | |
33 "description": "Array of Tab IDs that have a page rendered by this p rocess (for renderer processes only)." | |
34 }, | |
24 "cpu": { | 35 "cpu": { |
25 "type": "number", | 36 "type": "number", |
26 "description": "The most recent measurement of the process's CPU usa ge, between 0 and 100%." | 37 "optional": true, |
38 "description": "The most recent measurement of the process CPU usage , between 0 and 100%." | |
27 }, | 39 }, |
28 "network": { | 40 "network": { |
29 "type": "number", | 41 "type": "number", |
30 "description": "The most recent measurement of the process's network usage, in bytes per second." | 42 "optional": true, |
43 "description": "The most recent measurement of the process network u sage, in bytes per second." | |
31 }, | 44 }, |
32 "privateMemory": { | 45 "privateMemory": { |
33 "type": "number", | 46 "type": "number", |
34 "description": "The most recent measurement of the process's private memory usage, in bytes." | 47 "optional": true, |
48 "description": "The most recent measurement of the process private m emory usage, in bytes." | |
35 }, | 49 }, |
36 "sharedMemory": { | 50 "memoryUsage": { |
51 "$ref": "MemoryUsage", | |
52 "optional": true, | |
53 "description": "Object containing the most recent details about proc ess memory usage, in bytes." | |
54 }, | |
55 "jsMemoryAllocated": { | |
37 "type": "number", | 56 "type": "number", |
38 "description": "The most recent measurement of the process's shared memory usage, in bytes." | 57 "optional": true, |
58 "description": "The most recent measurement of the process JavaScrip t allocated memory, in bytes." | |
59 }, | |
60 "jsMemoryUsed": { | |
61 "type": "number", | |
62 "optional": true, | |
63 "description": "The most recent measurement of the process JavaScrip t memory used, in bytes." | |
64 }, | |
65 "sqliteMemory": { | |
66 "type": "number", | |
67 "optional": true, | |
68 "description": "The most recent measurement of the process’s SQLite memory usage, in bytes." | |
69 }, | |
70 "fps": { | |
71 "type": "number", | |
72 "optional": true, | |
73 "description": "The most recent measurement of the process frames pe r second." | |
74 }, | |
75 "imageCache": { | |
76 "$ref": "Cache", | |
77 "optional": true, | |
78 "description": "The most recent information about the image cache fo r the process." | |
79 }, | |
80 "scriptCache": { | |
81 "$ref": "Cache", | |
82 "optional": true, | |
83 "description": "The most recent information about the script cache f or the process." | |
84 }, | |
85 "cssCache": { | |
86 "$ref": "Cache", | |
87 "optional": true, | |
88 "description": "The most recent information about the CSS cache for the process." | |
89 } | |
90 } | |
91 }, | |
92 { | |
93 "id": "Cache", | |
94 "type": "object", | |
95 "description": "The Cache object contains information about the size and utilization of a cache used by Chromium.", | |
96 "properties": { | |
97 "size": { | |
98 "type": "number", | |
99 "description": "The size of the cache, in bytes." | |
100 }, | |
101 "liveSize": { | |
102 "type": "number", | |
103 "description": "The part of the cache that is utilized, in bytes." | |
104 } | |
105 } | |
106 }, | |
107 { | |
108 "id": "MemoryUsage", | |
Charlie Reis
2012/04/27 22:01:56
Do we want this in here? We're not using it yet.
nasko
2012/04/30 18:05:19
I've removed it.
| |
109 "type": "object", | |
110 "description": "The MemoryUsage object contains platform specific detail s about the memory usage of a process.", | |
111 "properties": { | |
112 "shared": { | |
113 "type": "integer", | |
114 "optional": true, | |
115 "description": "The most recent measurement of the process shared me mory usage, in bytes." | |
116 }, | |
117 "virtual": { | |
118 "type": "integer", | |
119 "optional": true, | |
120 "description": "The most recent measurement of the process virtual m emory usage, in bytes." | |
121 }, | |
122 "proprotional": { | |
123 "type": "integer", | |
124 "optional": true, | |
125 "description": "The most recent measurement of the process virtual m emory usage, in bytes." | |
126 }, | |
127 "resident": { | |
128 "type": "integer", | |
129 "optional": true, | |
130 "description": "The most recent measurement of the process resident memory usage, in bytes." | |
131 }, | |
132 "virtualMapped": { | |
133 "type": "integer", | |
134 "optional": true, | |
135 "description": "The most recent measurement of the process mapped vi rtual memory usage, in bytes." | |
39 } | 136 } |
40 } | 137 } |
41 } | 138 } |
42 ], | 139 ], |
43 "functions": [ | 140 "functions": [ |
44 { | 141 { |
142 "name": "terminate", | |
143 "type": "function", | |
144 "description": "Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.", | |
145 "parameters": [ | |
146 { | |
147 "name": "processId", | |
148 "type": "integer", | |
149 "minimum": 0 | |
150 }, | |
151 { | |
152 "name": "callback", | |
153 "type": "function", | |
154 "optional": true, | |
155 "parameters": [ | |
156 { | |
157 "name": "didTerminate", | |
158 "type": "boolean", | |
159 "description": "True if the process was successfully killed." | |
160 } | |
161 ] | |
162 } | |
163 ] | |
164 }, | |
165 { | |
45 "name": "getProcessIdForTab", | 166 "name": "getProcessIdForTab", |
46 "type": "function", | 167 "type": "function", |
47 "description": "Returns the ID of the renderer process for the specified tab.", | 168 "description": "Returns the ID of the renderer process for the specified tab.", |
48 "parameters": [ | 169 "parameters": [ |
49 { | 170 { |
50 "name": "tabId", | 171 "name": "tabId", |
51 "type": "integer", | 172 "type": "integer", |
52 "minimum": 0 | 173 "minimum": 0 |
53 }, | 174 }, |
54 { | 175 { |
176 "name": "callback", | |
55 "type": "function", | 177 "type": "function", |
56 "name": "callback", | |
57 "parameters": [ | 178 "parameters": [ |
58 { | 179 { |
59 "name": "processId", | 180 "name": "processId", |
60 "type": "integer", | 181 "type": "integer", |
61 "description": "Process ID of the tab's renderer process." | 182 "description": "Process ID of the tab's renderer process." |
62 } | 183 } |
63 ] | 184 ] |
64 } | 185 } |
65 ] | 186 ] |
187 }, | |
188 { | |
189 "name": "getProcessInfo", | |
190 "type": "function", | |
191 "description": "Retrieves the process information for each process ID sp ecified.", | |
192 "parameters": [ | |
193 { | |
194 "name": "processIds", | |
195 "choices": [ | |
196 {"type": "integer", "minimum": 0}, | |
197 {"type": "array", "items": {"type": "integer", "minimum": 0}} | |
198 ] | |
199 }, | |
200 { | |
201 "name": "includeMemory", | |
202 "type": "boolean" | |
203 }, | |
204 { | |
205 "name": "callback", | |
206 "type": "function", | |
207 "parameters": [ | |
208 { | |
209 "name": "processes", | |
210 "description": "", | |
211 "type": "object", | |
212 "additionalProperties": { "$ref": "Process" } | |
213 } | |
214 ] | |
215 } | |
216 ] | |
66 } | 217 } |
67 ], | 218 ], |
68 "events": [ | 219 "events": [ |
69 { | 220 { |
70 "name": "onUpdated", | 221 "name": "onUpdated", |
71 "type": "function", | 222 "type": "function", |
72 "description": "Fired each time the Task Manager updates its process sta tistics, providing the dictionary of updated Process objects, indexed by process ID.", | 223 "description": "Fired each time the Task Manager updates its process sta tistics, providing the dictionary of updated Process objects, indexed by process ID.", |
73 "parameters": [ | 224 "parameters": [ |
74 { | 225 { |
75 "name": "processes", | 226 "name": "processes", |
76 "type": "object", | 227 "type": "object", |
77 "additionalProperties": { "$ref": "Process" } | 228 "additionalProperties": { "$ref": "Process" } |
78 } | 229 } |
79 ] | 230 ] |
231 }, | |
232 { | |
233 "name": "onUpdatedWithMemory", | |
234 "type": "function", | |
235 "description": "Fired each time the Task Manager updates its process sta tistics, providing the dictionary of updated Process objects, indexed by process ID. Identical to onUpdate, with the addition of memory usage details included i n each Process object. Note, collecting memory usage information incurs extra CP U usage and should only be listened for when needed.", | |
236 "parameters": [ | |
237 { | |
238 "name": "processes", | |
239 "type": "object", | |
240 "additionalProperties": { "$ref": "Process" } | |
241 } | |
242 ] | |
243 }, | |
244 { | |
245 "name": "onCreated", | |
246 "type": "function", | |
247 "description": "Fired each time a process is created, providing the corr seponding Process object.", | |
248 "parameters": [ | |
249 { | |
250 "name": "processId", | |
251 "type": "integer" | |
252 }, | |
253 { | |
254 "name": "process", | |
255 "$ref": "Process" | |
256 } | |
257 ] | |
258 }, | |
259 { | |
260 "name": "onUnresponsive", | |
261 "type": "function", | |
262 "description": "Fired each time a process becomes unresponsive, providin g the corrseponding Process object.", | |
263 "parameters": [ | |
264 { | |
265 "name": "process", | |
266 "$ref": "Process" | |
267 } | |
268 ] | |
269 }, | |
270 { | |
271 "name": "onExited", | |
272 "type": "function", | |
273 "description": "Fired each time a process is terminated, providing the t ype of exit.", | |
274 "parameters": [ | |
275 { | |
276 "name": "processId", | |
277 "type": "integer" | |
278 }, | |
279 { | |
280 "name": "exitType", | |
281 "type": "integer" | |
282 }, | |
283 { | |
284 "name": "exitCode", | |
285 "type": "integer" | |
286 } | |
287 ] | |
80 } | 288 } |
81 ] | 289 ] |
82 } | 290 } |
83 ] | 291 ] |
OLD | NEW |