Index: chrome/common/extensions/api/experimental_processes.json |
diff --git a/chrome/common/extensions/api/experimental_processes.json b/chrome/common/extensions/api/experimental_processes.json |
index be7cf5269bfabe43025f80d03ecaa977ebf47633..5fdeebcdb307f494288c3813a0dc4135d7b91637 100644 |
--- a/chrome/common/extensions/api/experimental_processes.json |
+++ b/chrome/common/extensions/api/experimental_processes.json |
@@ -5,7 +5,6 @@ |
[ |
{ |
"namespace": "experimental.processes", |
- "nodoc": true, |
"types": [ |
{ |
"id": "Process", |
@@ -14,6 +13,10 @@ |
"properties": { |
"id": { |
"type": "integer", |
+ "description": "Unique ID of the process provided by the browser." |
+ }, |
+ "osProcessId": { |
+ "type": "integer", |
"description": "The ID of the process, as provided by the OS." |
}, |
"type": { |
@@ -21,27 +24,109 @@ |
"enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"], |
"description": "The type of process." |
}, |
+ "profile": { |
+ "type": "string", |
+ "description": "The profile which the process is associated with." |
+ }, |
+ "tabs": { |
+ "type": "array", "items": {"type": "integer", "minimum": 0}, |
+ "description": "Array of Tab IDs that have a page rendered by this process. The list will be non-empty for renderer processes only." |
+ }, |
"cpu": { |
"type": "number", |
- "description": "The most recent measurement of the process's CPU usage, between 0 and 100%." |
+ "optional": true, |
+ "description": "The most recent measurement of the process CPU usage, between 0 and 100%. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
}, |
"network": { |
"type": "number", |
- "description": "The most recent measurement of the process's network usage, in bytes per second." |
+ "optional": true, |
+ "description": "The most recent measurement of the process network usage, in bytes per second. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
}, |
"privateMemory": { |
"type": "number", |
- "description": "The most recent measurement of the process's private memory usage, in bytes." |
+ "optional": true, |
+ "description": "The most recent measurement of the process private memory usage, in bytes. Only available when receiving the object as part of a callback from onUpdatedWithMemory or getProcessInfo with the includeMemory flag." |
+ }, |
+ "jsMemoryAllocated": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "The most recent measurement of the process JavaScript allocated memory, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "jsMemoryUsed": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "The most recent measurement of the process JavaScript memory used, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "sqliteMemory": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "The most recent measurement of the process’s SQLite memory usage, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "fps": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "The most recent measurement of the process frames per second. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "imageCache": { |
+ "$ref": "Cache", |
+ "optional": true, |
+ "description": "The most recent information about the image cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "scriptCache": { |
+ "$ref": "Cache", |
+ "optional": true, |
+ "description": "The most recent information about the script cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ }, |
+ "cssCache": { |
+ "$ref": "Cache", |
+ "optional": true, |
+ "description": "The most recent information about the CSS cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory." |
+ } |
+ } |
+ }, |
+ { |
+ "id": "Cache", |
+ "type": "object", |
+ "description": "The Cache object contains information about the size and utilization of a cache used by the browser.", |
+ "properties": { |
+ "size": { |
+ "type": "number", |
+ "description": "The size of the cache, in bytes." |
}, |
- "sharedMemory": { |
+ "liveSize": { |
"type": "number", |
- "description": "The most recent measurement of the process's shared memory usage, in bytes." |
+ "description": "The part of the cache that is utilized, in bytes." |
} |
} |
} |
], |
"functions": [ |
{ |
+ "name": "terminate", |
+ "type": "function", |
+ "description": "Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.", |
+ "parameters": [ |
+ { |
+ "name": "processId", |
+ "type": "integer", |
+ "minimum": 0, |
+ "description": "The ID of the process to be terminated." |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "optional": true, |
+ "parameters": [ |
+ { |
+ "name": "didTerminate", |
+ "type": "boolean", |
+ "description": "True if terminating the process was successful, otherwise false." |
+ } |
+ ] |
+ } |
+ ] |
+ }, |
+ { |
"name": "getProcessIdForTab", |
"type": "function", |
"description": "Returns the ID of the renderer process for the specified tab.", |
@@ -49,11 +134,12 @@ |
{ |
"name": "tabId", |
"type": "integer", |
- "minimum": 0 |
+ "minimum": 0, |
+ "description": "The ID of the tab for which the renderer process ID is to be returned." |
}, |
{ |
- "type": "function", |
"name": "callback", |
+ "type": "function", |
"parameters": [ |
{ |
"name": "processId", |
@@ -63,6 +149,39 @@ |
] |
} |
] |
+ }, |
+ { |
+ "name": "getProcessInfo", |
+ "type": "function", |
+ "description": "Retrieves the process information for each process ID specified.", |
+ "parameters": [ |
+ { |
+ "name": "processIds", |
+ "choices": [ |
+ {"type": "integer", "minimum": 0}, |
+ {"type": "array", "items": {"type": "integer", "minimum": 0}} |
+ ], |
+ "description": "The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested." |
+ }, |
+ { |
+ "name": "includeMemory", |
+ "type": "boolean", |
+ "description": "True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed." |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "description": "Called when the processes information is collected.", |
+ "parameters": [ |
+ { |
+ "name": "processes", |
+ "description": "A dictionary of Process objects for each requested process that is a live child process of the current browser process, indexed by process ID. Metrics requiring aggregation over time will not be populated in each Process object.", |
+ "type": "object", |
+ "additionalProperties": { "$ref": "Process" } |
+ } |
+ ] |
+ } |
+ ] |
} |
], |
"events": [ |
@@ -74,9 +193,69 @@ |
{ |
"name": "processes", |
"type": "object", |
+ "description": "A dictionary of updated Process objects for each live process in the browser, indexed by process ID. Metrics requiring aggregation over time will be populated in each Process object.", |
"additionalProperties": { "$ref": "Process" } |
} |
] |
+ }, |
+ { |
+ "name": "onUpdatedWithMemory", |
+ "type": "function", |
+ "description": "Fired each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID. Identical to onUpdate, with the addition of memory usage details included in each Process object. Note, collecting memory usage information incurs extra CPU usage and should only be listened for when needed.", |
+ "parameters": [ |
+ { |
+ "name": "processes", |
+ "type": "object", |
+ "description": "A dictionary of updated Process objects for each live process in the browser, indexed by process ID. Memory usage details will be included in each Process object.", |
+ "additionalProperties": { "$ref": "Process" } |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "onCreated", |
+ "type": "function", |
+ "description": "Fired each time a process is created, providing the corrseponding Process object.", |
+ "parameters": [ |
+ { |
+ "name": "process", |
+ "description": "Details of the process that was created. Metrics requiring aggregation over time will not be populated in the object.", |
+ "$ref": "Process" |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "onUnresponsive", |
+ "type": "function", |
+ "description": "Fired each time a process becomes unresponsive, providing the corrseponding Process object.", |
+ "parameters": [ |
+ { |
+ "name": "process", |
+ "description": "Details of the unresponsive process. Metrics requiring aggregation over time will not be populated in the object. Only available for renderer processes.", |
+ "$ref": "Process" |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "onExited", |
+ "type": "function", |
+ "description": "Fired each time a process is terminated, providing the type of exit.", |
+ "parameters": [ |
+ { |
+ "name": "processId", |
+ "description": "The ID of the process that exited.", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "exitType", |
+ "description": "The type of exit that occurred for the process - normal, abnormal, killed, crashed. Only available for renderer processes.", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "exitCode", |
+ "description": "The exit code if the process exited abnormally. Only available for renderer processes.", |
+ "type": "integer" |
+ } |
+ ] |
} |
] |
} |