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

Side by Side Diff: chrome/common/extensions/api/experimental.processes.json

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

Powered by Google App Engine
This is Rietveld 408576698