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

Unified 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: Moved to async extension functions and generated docs. 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 side-by-side diff with in-line comments
Download patch
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..fa719b337043c36d1e290228b4c49298cbf2e82e 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 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
+ },
+ "osProcessId": {
+ "type": "integer",
"description": "The ID of the process, as provided by the OS."
},
"type": {
@@ -21,27 +24,145 @@
"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 (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%."
},
"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."
},
"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."
+ },
+ "memoryUsage": {
+ "$ref": "MemoryUsage",
+ "optional": true,
+ "description": "Object containing the most recent details about process memory usage, in bytes."
+ },
+ "jsMemoryAllocated": {
+ "type": "number",
+ "optional": true,
+ "description": "The most recent measurement of the process JavaScript allocated memory, in bytes."
+ },
+ "jsMemoryUsed": {
+ "type": "number",
+ "optional": true,
+ "description": "The most recent measurement of the process JavaScript memory used, in bytes."
},
- "sharedMemory": {
+ "sqliteMemory": {
"type": "number",
- "description": "The most recent measurement of the process's shared memory usage, in bytes."
+ "optional": true,
+ "description": "The most recent measurement of the process’s SQLite memory usage, in bytes."
+ },
+ "fps": {
+ "type": "number",
+ "optional": true,
+ "description": "The most recent measurement of the process frames per second."
+ },
+ "imageCache": {
+ "$ref": "Cache",
+ "optional": true,
+ "description": "The most recent information about the image cache for the process."
+ },
+ "scriptCache": {
+ "$ref": "Cache",
+ "optional": true,
+ "description": "The most recent information about the script cache for the process."
+ },
+ "cssCache": {
+ "$ref": "Cache",
+ "optional": true,
+ "description": "The most recent information about the CSS cache for the process."
+ }
+ }
+ },
+ {
+ "id": "Cache",
+ "type": "object",
+ "description": "The Cache object contains information about the size and utilization of a cache used by Chromium.",
+ "properties": {
+ "size": {
+ "type": "number",
+ "description": "The size of the cache, in bytes."
+ },
+ "liveSize": {
+ "type": "number",
+ "description": "The part of the cache that is utilized, in bytes."
+ }
+ }
+ },
+ {
+ "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.
+ "type": "object",
+ "description": "The MemoryUsage object contains platform specific details about the memory usage of a process.",
+ "properties": {
+ "shared": {
+ "type": "integer",
+ "optional": true,
+ "description": "The most recent measurement of the process shared memory usage, in bytes."
+ },
+ "virtual": {
+ "type": "integer",
+ "optional": true,
+ "description": "The most recent measurement of the process virtual memory usage, in bytes."
+ },
+ "proprotional": {
+ "type": "integer",
+ "optional": true,
+ "description": "The most recent measurement of the process virtual memory usage, in bytes."
+ },
+ "resident": {
+ "type": "integer",
+ "optional": true,
+ "description": "The most recent measurement of the process resident memory usage, in bytes."
+ },
+ "virtualMapped": {
+ "type": "integer",
+ "optional": true,
+ "description": "The most recent measurement of the process mapped virtual memory usage, 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
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "didTerminate",
+ "type": "boolean",
+ "description": "True if the process was successfully killed."
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "getProcessIdForTab",
"type": "function",
"description": "Returns the ID of the renderer process for the specified tab.",
@@ -52,8 +173,8 @@
"minimum": 0
},
{
- "type": "function",
"name": "callback",
+ "type": "function",
"parameters": [
{
"name": "processId",
@@ -63,6 +184,36 @@
]
}
]
+ },
+ {
+ "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}}
+ ]
+ },
+ {
+ "name": "includeMemory",
+ "type": "boolean"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "processes",
+ "description": "",
+ "type": "object",
+ "additionalProperties": { "$ref": "Process" }
+ }
+ ]
+ }
+ ]
}
],
"events": [
@@ -77,6 +228,63 @@
"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",
+ "additionalProperties": { "$ref": "Process" }
+ }
+ ]
+ },
+ {
+ "name": "onCreated",
+ "type": "function",
+ "description": "Fired each time a process is created, providing the corrseponding Process object.",
+ "parameters": [
+ {
+ "name": "processId",
+ "type": "integer"
+ },
+ {
+ "name": "process",
+ "$ref": "Process"
+ }
+ ]
+ },
+ {
+ "name": "onUnresponsive",
+ "type": "function",
+ "description": "Fired each time a process becomes unresponsive, providing the corrseponding Process object.",
+ "parameters": [
+ {
+ "name": "process",
+ "$ref": "Process"
+ }
+ ]
+ },
+ {
+ "name": "onExited",
+ "type": "function",
+ "description": "Fired each time a process is terminated, providing the type of exit.",
+ "parameters": [
+ {
+ "name": "processId",
+ "type": "integer"
+ },
+ {
+ "name": "exitType",
+ "type": "integer"
+ },
+ {
+ "name": "exitCode",
+ "type": "integer"
+ }
+ ]
}
]
}

Powered by Google App Engine
This is Rietveld 408576698