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

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: Improved task manager sample and minor cleanup. Created 8 years, 7 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,
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."
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": {
Charlie Reis 2012/05/04 20:41:30 The API doc says this is optional, but we appear t
nasko 2012/05/07 17:08:47 Doc updated.
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%."
Charlie Reis 2012/05/04 20:41:30 I think we do want to include the clauses about wh
nasko 2012/05/07 17:08:47 I've synced all the others with the clause from th
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": {
Charlie Reis 2012/05/04 20:41:30 This is still here. Please remove.
nasko 2012/05/07 17:08:47 Done.
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.",
Charlie Reis 2012/05/04 20:41:30 We should be consistent about Chrome vs Chromium i
nasko 2012/05/07 17:08:47 Replaced by "the browser" to be agnostic to the na
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."
39 } 104 }
40 } 105 }
41 } 106 }
42 ], 107 ],
43 "functions": [ 108 "functions": [
44 { 109 {
110 "name": "terminate",
111 "type": "function",
112 "description": "Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.",
113 "parameters": [
114 {
115 "name": "processId",
116 "type": "integer",
117 "minimum": 0
118 },
119 {
120 "name": "callback",
121 "type": "function",
122 "optional": true,
123 "parameters": [
124 {
125 "name": "didTerminate",
126 "type": "boolean",
127 "description": "True if the process was successfully killed."
128 }
129 ]
130 }
131 ]
132 },
133 {
45 "name": "getProcessIdForTab", 134 "name": "getProcessIdForTab",
46 "type": "function", 135 "type": "function",
47 "description": "Returns the ID of the renderer process for the specified tab.", 136 "description": "Returns the ID of the renderer process for the specified tab.",
48 "parameters": [ 137 "parameters": [
49 { 138 {
50 "name": "tabId", 139 "name": "tabId",
51 "type": "integer", 140 "type": "integer",
52 "minimum": 0 141 "minimum": 0
53 }, 142 },
54 { 143 {
144 "name": "callback",
55 "type": "function", 145 "type": "function",
56 "name": "callback",
57 "parameters": [ 146 "parameters": [
58 { 147 {
59 "name": "processId", 148 "name": "processId",
60 "type": "integer", 149 "type": "integer",
61 "description": "Process ID of the tab's renderer process." 150 "description": "Process ID of the tab's renderer process."
62 } 151 }
63 ] 152 ]
64 } 153 }
65 ] 154 ]
155 },
156 {
157 "name": "getProcessInfo",
158 "type": "function",
159 "description": "Retrieves the process information for each process ID sp ecified.",
160 "parameters": [
161 {
162 "name": "processIds",
163 "choices": [
164 {"type": "integer", "minimum": 0},
165 {"type": "array", "items": {"type": "integer", "minimum": 0}}
166 ]
167 },
168 {
169 "name": "includeMemory",
170 "type": "boolean"
Charlie Reis 2012/05/04 20:41:30 Please include descriptions of all the parameters
nasko 2012/05/07 17:08:47 Done.
171 },
172 {
173 "name": "callback",
174 "type": "function",
175 "parameters": [
176 {
177 "name": "processes",
178 "description": "",
179 "type": "object",
180 "additionalProperties": { "$ref": "Process" }
181 }
182 ]
183 }
184 ]
66 } 185 }
67 ], 186 ],
68 "events": [ 187 "events": [
69 { 188 {
70 "name": "onUpdated", 189 "name": "onUpdated",
71 "type": "function", 190 "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.", 191 "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": [ 192 "parameters": [
74 { 193 {
75 "name": "processes", 194 "name": "processes",
76 "type": "object", 195 "type": "object",
77 "additionalProperties": { "$ref": "Process" } 196 "additionalProperties": { "$ref": "Process" }
78 } 197 }
79 ] 198 ]
199 },
200 {
201 "name": "onUpdatedWithMemory",
202 "type": "function",
203 "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.",
204 "parameters": [
205 {
206 "name": "processes",
207 "type": "object",
208 "additionalProperties": { "$ref": "Process" }
209 }
210 ]
211 },
212 {
213 "name": "onCreated",
214 "type": "function",
215 "description": "Fired each time a process is created, providing the corr seponding Process object.",
216 "parameters": [
217 {
218 "name": "processId",
219 "type": "integer"
220 },
221 {
222 "name": "process",
223 "$ref": "Process"
224 }
225 ]
226 },
227 {
228 "name": "onUnresponsive",
229 "type": "function",
230 "description": "Fired each time a process becomes unresponsive, providin g the corrseponding Process object.",
231 "parameters": [
232 {
233 "name": "process",
234 "$ref": "Process"
235 }
236 ]
237 },
238 {
239 "name": "onExited",
240 "type": "function",
241 "description": "Fired each time a process is terminated, providing the t ype of exit.",
242 "parameters": [
243 {
244 "name": "processId",
245 "type": "integer"
246 },
247 {
248 "name": "exitType",
249 "type": "integer"
250 },
251 {
252 "name": "exitCode",
253 "type": "integer"
254 }
255 ]
80 } 256 }
81 ] 257 ]
82 } 258 }
83 ] 259 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698