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

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: 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..077a93762d9ef928651c30e4754a73a56176507c 100644
--- a/chrome/common/extensions/api/experimental.processes.json
+++ b/chrome/common/extensions/api/experimental.processes.json
@@ -14,6 +14,11 @@
"properties": {
"id": {
"type": "integer",
+ "description": "Unique ID of the process provided by Chrome"
+ },
+ "osProcessId": {
+ "type": "integer",
+ "optional": true,
"description": "The ID of the process, as provided by the OS."
},
"type": {
@@ -21,27 +26,147 @@
"enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"],
"description": "The type of process."
},
+ "profile": {
+ "type": "string",
+ "optional": true,
+ "description": "The profile which the process is associated with."
+ },
+ "tabs": {
+ "type": "array", "items": {"type": "integer", "minimum": 0},
+ "optional": true,
+ "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%."
Charlie Reis 2012/04/23 22:19:51 This seems more grammatically correct to me, but I
+ "optional": true,
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
+ "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 section."
Charlie Reis 2012/04/23 22:19:51 frames per second
nasko 2012/04/24 18:14:29 Done.
+ },
+ "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",
+ "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 +177,8 @@
"minimum": 0
},
{
- "type": "function",
"name": "callback",
+ "type": "function",
"parameters": [
{
"name": "processId",
@@ -63,6 +188,36 @@
]
}
]
+ },
+ {
+ "name": "getProcessInfo",
+ "type": "function",
+ "description": "",
Charlie Reis 2012/04/23 22:19:51 Description?
nasko 2012/04/24 18:14:29 Done.
+ "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 +232,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.",
Charlie Reis 2012/04/23 22:19:51 Should we note the implications for CPU overhead?
nasko 2012/04/24 18:14:29 Done.
+ "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