getProcessInfo method
Retrieves the process information for each process ID specified. |processIds|: The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested. |includeMemory|: True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
Implementation
Future<Map> getProcessInfo(
Object processIds,
bool includeMemory,
) async {
var $res = await $js.chrome.processes
.getProcessInfo(
switch (processIds) {
int() => processIds.toJS,
List<int>() => processIds.toJSArray((e) => e.toJS),
_ => throw UnsupportedError(
'Received type: ${processIds.runtimeType}. Supported types are: int, List<int>')
},
includeMemory,
)
.toDart;
return $res.toDartMap();
}