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

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: Fix nit. 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
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | chrome/common/extensions/api/schemas.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 166
160 // Fired each time a process is terminated, providing the type of exit. 167 // Fired each time a process is terminated, providing the type of exit.
161 // |processId|: The ID of the process that exited. 168 // |processId|: The ID of the process that exited.
162 // |exitType|: The type of exit that occurred for the process - normal, 169 // |exitType|: The type of exit that occurred for the process - normal,
163 // abnormal, killed, crashed. Only available for renderer processes. 170 // abnormal, killed, crashed. Only available for renderer processes.
164 // |exitCode|: The exit code if the process exited abnormally. Only 171 // |exitCode|: The exit code if the process exited abnormally. Only
165 // available for renderer processes. 172 // available for renderer processes.
166 static void onExited(long processId, long exitType, long exitCode); 173 static void onExited(long processId, long exitType, long exitCode);
167 }; 174 };
168 }; 175 };
OLDNEW
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | chrome/common/extensions/api/schemas.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698