1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace": "experimental.processes",
"nodoc": true,
"types": [
{
"id": "Process",
"type": "object",
"description": "An object containing information about one of the browser's processes.",
"properties": {
"id": {
"type": "integer",
"description": "The ID of the process, as provided by the OS."
},
"type": {
"type": "string",
"enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"],
"description": "The type of process."
},
"cpu": {
"type": "number",
"description": "The most recent measurement of the process's CPU usage, between 0 and 100%."
},
"network": {
"type": "number",
"description": "The most recent measurement of the process's network usage, in bytes per second."
},
"privateMemory": {
"type": "number",
"description": "The most recent measurement of the process's private memory usage, in bytes."
},
"sharedMemory": {
"type": "number",
"description": "The most recent measurement of the process's shared memory usage, in bytes."
}
}
}
],
"functions": [
{
"name": "getProcessIdForTab",
"type": "function",
"description": "Returns the ID of the renderer process for the specified tab.",
"parameters": [
{
"name": "tabId",
"type": "integer",
"minimum": 0
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "processId",
"type": "integer",
"description": "Process ID of the tab's renderer process."
}
]
}
]
}
],
"events": [
{
"name": "onUpdated",
"type": "function",
"description": "Fired each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID.",
"parameters": [
{
"name": "processes",
"type": "object",
"additionalProperties": { "$ref": "Process" }
}
]
}
]
}
]
|