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

Side by Side Diff: chrome/common/extensions/api/processes.idl

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase ... Created 4 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // Use the <code>chrome.processes</code> API to interact with the browser's 5 // Use the <code>chrome.processes</code> API to interact with the browser's
6 // processes. 6 // processes.
7 namespace processes { 7 namespace processes {
8 // The types of the browser processes. 8 // The types of the browser processes.
9 enum ProcessType { 9 enum ProcessType {
10 browser, 10 browser,
11 renderer, 11 renderer,
12 extension, 12 extension,
13 notification, 13 notification,
14 plugin, 14 plugin,
15 worker, 15 worker,
16 nacl, 16 nacl,
17 utility, 17 utility,
18 gpu, 18 gpu,
19 other 19 other
20 }; 20 };
21
22 // An object that represents a Chrome task running on a process. Several tasks
23 // can share the same process.
24 dictionary TaskInfo {
25 // The title of the task.
26 DOMString title;
27 // Optional tab ID, if this task represents a tab running on a renderer
28 // process.
29 long? tabId;
30 };
21 31
22 // The Cache object contains information about the size and utilization of a 32 // The Cache object contains information about the size and utilization of a
23 // cache used by the browser. 33 // cache used by the browser.
24 dictionary Cache { 34 dictionary Cache {
25 // The size of the cache, in bytes. 35 // The size of the cache, in bytes.
26 double size; 36 double size;
27 // The part of the cache that is utilized, in bytes. 37 // The part of the cache that is utilized, in bytes.
28 double liveSize; 38 double liveSize;
29 }; 39 };
30 40
31 // An object containing information about one of the browser's processes. 41 // An object containing information about one of the browser's processes.
32 dictionary Process { 42 dictionary Process {
33 // Unique ID of the process provided by the browser. 43 // Unique ID of the process provided by the browser.
34 long id; 44 long id;
35 // The ID of the process, as provided by the OS. 45 // The ID of the process, as provided by the OS.
36 long osProcessId; 46 long osProcessId;
37 // The title of the process as seen in the task manager.
38 DOMString title;
39 // The type of process. 47 // The type of process.
40 ProcessType type; 48 ProcessType type;
41 // The profile which the process is associated with. 49 // The profile which the process is associated with.
42 DOMString profile; 50 DOMString profile;
43 // The debugging port for Native Client processes. Zero for other process 51 // The debugging port for Native Client processes. Zero for other process
44 // types and for NaCl processes that do not have debugging enabled. 52 // types and for NaCl processes that do not have debugging enabled.
45 long naclDebugPort; 53 long naclDebugPort;
46 // Array of Tab IDs that have a page rendered by this process. The list will 54 // Array of TaskInfos representing the tasks running on this process.
47 // be non-empty for renderer processes only. 55 TaskInfo[] tasks;
Devlin 2016/03/03 23:12:43 Breaking changes :( Is there anything else we sho
afakhry 2016/03/08 01:37:30 No this is just it.
48 long[] tabs;
49 // The most recent measurement of the process CPU usage, between 0 and 100. 56 // The most recent measurement of the process CPU usage, between 0 and 100.
50 // Only available when receiving the object as part of a callback from 57 // Only available when receiving the object as part of a callback from
51 // onUpdated or onUpdatedWithMemory. 58 // onUpdated or onUpdatedWithMemory.
52 double? cpu; 59 double? cpu;
53 // The most recent measurement of the process network usage, in bytes per 60 // The most recent measurement of the process network usage, in bytes per
54 // second. Only available when receiving the object as part of a callback 61 // second. Only available when receiving the object as part of a callback
55 // from onUpdated or onUpdatedWithMemory. 62 // from onUpdated or onUpdatedWithMemory.
56 double? network; 63 double? network;
57 // The most recent measurement of the process private memory usage, in 64 // The most recent measurement of the process private memory usage, in
58 // bytes. Only available when receiving the object as part of a callback 65 // bytes. Only available when receiving the object as part of a callback
(...skipping 17 matching lines...) Expand all
76 Cache? imageCache; 83 Cache? imageCache;
77 // The most recent information about the script cache for the process. Only 84 // The most recent information about the script cache for the process. Only
78 // available when receiving the object as part of a callback from onUpdated 85 // available when receiving the object as part of a callback from onUpdated
79 // or onUpdatedWithMemory. 86 // or onUpdatedWithMemory.
80 Cache? scriptCache; 87 Cache? scriptCache;
81 // The most recent information about the CSS cache for the process. Only 88 // The most recent information about the CSS cache for the process. Only
82 // available when receiving the object as part of a callback from onUpdated 89 // available when receiving the object as part of a callback from onUpdated
83 // or onUpdatedWithMemory. 90 // or onUpdatedWithMemory.
84 Cache? cssCache; 91 Cache? cssCache;
85 }; 92 };
86 93
87 // A callback to report the status of the termination. 94 // A callback to report the status of the termination.
88 // |didTerminate|: True if terminating the process was successful, and false 95 // |didTerminate|: True if terminating the process was successful, and false
89 // otherwise. 96 // otherwise.
90 callback TerminateCallback = void(boolean didTerminate); 97 callback TerminateCallback = void(boolean didTerminate);
91 98
92 // A callback to return the ID of the renderer process of a tab. 99 // A callback to return the ID of the renderer process of a tab.
93 // |processId|: Process ID of the tab's renderer process. 100 // |processId|: Process ID of the tab's renderer process.
94 callback GetProcessIdForTabCallback = void(long processId); 101 callback GetProcessIdForTabCallback = void(long processId);
95 102
96 // A callback called when the processes information is collected. 103 // A callback called when the processes information is collected.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // process in the browser, indexed by process ID. Metrics requiring 139 // process in the browser, indexed by process ID. Metrics requiring
133 // aggregation over time will be populated in each Process object. 140 // aggregation over time will be populated in each Process object.
134 static void onUpdated(object processes); 141 static void onUpdated(object processes);
135 142
136 // Fired each time the Task Manager updates its process statistics, 143 // Fired each time the Task Manager updates its process statistics,
137 // providing the dictionary of updated Process objects, indexed by process 144 // providing the dictionary of updated Process objects, indexed by process
138 // ID. Identical to onUpdate, with the addition of memory usage details 145 // ID. Identical to onUpdate, with the addition of memory usage details
139 // included in each Process object. Note, collecting memory usage 146 // included in each Process object. Note, collecting memory usage
140 // information incurs extra CPU usage and should only be listened for when 147 // information incurs extra CPU usage and should only be listened for when
141 // needed. 148 // needed.
149
Devlin 2016/03/03 23:12:43 Will this newline affect our doc parsing?
afakhry 2016/03/08 01:37:30 Reverted this line.
142 // |processes|: A dictionary of updated $(ref:Process) objects for each live 150 // |processes|: A dictionary of updated $(ref:Process) objects for each live
143 // process in the browser, indexed by process ID. Memory usage details will 151 // process in the browser, indexed by process ID. Memory usage details will
144 // be included in each Process object. 152 // be included in each Process object.
145 static void onUpdatedWithMemory(object processes); 153 static void onUpdatedWithMemory(object processes);
146 154
147 // Fired each time a process is created, providing the corrseponding Process 155 // Fired each time a process is created, providing the corrseponding Process
148 // object. 156 // object.
149 // |process|: Details of the process that was created. Metrics requiring 157 // |process|: Details of the process that was created. Metrics requiring
150 // aggregation over time will not be populated in the object. 158 // aggregation over time will not be populated in the object.
151 static void onCreated(Process process); 159 static void onCreated(Process process);
152 160
153 // Fired each time a process becomes unresponsive, providing the 161 // Fired each time a process becomes unresponsive, providing the
154 // corrseponding Process object. 162 // corrseponding Process object.
155 // |process|: Details of the unresponsive process. Metrics requiring 163 // |process|: Details of the unresponsive process. Metrics requiring
156 // aggregation over time will not be populated in the object. Only available 164 // aggregation over time will not be populated in the object. Only available
157 // for renderer processes. 165 // for renderer processes.
158 static void onUnresponsive(Process process); 166 static void onUnresponsive(Process process);
159 167
160 // Fired each time a process is terminated, providing the type of exit. 168 // Fired each time a process is terminated, providing the type of exit.
161 // |processId|: The ID of the process that exited. 169 // |processId|: The ID of the process that exited.
162 // |exitType|: The type of exit that occurred for the process - normal, 170 // |exitType|: The type of exit that occurred for the process - normal,
163 // abnormal, killed, crashed. Only available for renderer processes. 171 // abnormal, killed, crashed. Only available for renderer processes.
164 // |exitCode|: The exit code if the process exited abnormally. Only 172 // |exitCode|: The exit code if the process exited abnormally. Only
165 // available for renderer processes. 173 // available for renderer processes.
166 static void onExited(long processId, long exitType, long exitCode); 174 static void onExited(long processId, long exitType, long exitCode);
167 }; 175 };
168 }; 176 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698