Use the chrome.processes API to interact with the browser's processes.
Use the chrome.processes API to interact with the browser's processes. * available since Chrome 87 * https://developer.chrome.com/extensions/processes
(get-process-id-for-tab tab-id)
Returns the ID of the renderer process for the specified tab.
|tab-id| - The ID of the tab for which the renderer process ID is to be returned.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [process-id] where:
|process-id| - Process ID of the tab's renderer process.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/processes#method-getProcessIdForTab.
Returns the ID of the renderer process for the specified tab. |tab-id| - The ID of the tab for which the renderer process ID is to be returned. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [process-id] where: |process-id| - Process ID of the tab's renderer process. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/processes#method-getProcessIdForTab.
(get-process-info process-ids include-memory)
Retrieves the process information for each process ID specified.
|process-ids| - The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested. |include-memory| - True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [processes] where:
|processes| - A dictionary of 'Process' objects for each requested process that is a live child process of the current browser process, indexed by process ID. Metrics requiring aggregation over time will not be populated in each Process object.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/processes#method-getProcessInfo.
Retrieves the process information for each process ID specified. |process-ids| - The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested. |include-memory| - True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [processes] where: |processes| - A dictionary of 'Process' objects for each requested process that is a live child process of the current browser process, indexed by process ID. Metrics requiring aggregation over time will not be populated in each Process object. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/processes#method-getProcessInfo.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.processes namespace.
Taps all valid non-deprecated events in chromex.ext.processes namespace.
(tap-on-created-events channel & args)
Fired each time a process is created, providing the corrseponding Process object.
Events will be put on the |channel| with signature [::on-created [process]] where:
|process| - Details of the process that was created. Metrics requiring aggregation over time will not be populated in the object.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/processes#event-onCreated.
Fired each time a process is created, providing the corrseponding Process object. Events will be put on the |channel| with signature [::on-created [process]] where: |process| - Details of the process that was created. Metrics requiring aggregation over time will not be populated in the object. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/processes#event-onCreated.
(tap-on-exited-events channel & args)
Fired each time a process is terminated, providing the type of exit.
Events will be put on the |channel| with signature [::on-exited [process-id exit-type exit-code]] where:
|process-id| - The ID of the process that exited. |exit-type| - The type of exit that occurred for the process - normal, abnormal, killed, crashed. Only available for renderer processes. |exit-code| - The exit code if the process exited abnormally. Only available for renderer processes.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/processes#event-onExited.
Fired each time a process is terminated, providing the type of exit. Events will be put on the |channel| with signature [::on-exited [process-id exit-type exit-code]] where: |process-id| - The ID of the process that exited. |exit-type| - The type of exit that occurred for the process - normal, abnormal, killed, crashed. Only available for renderer processes. |exit-code| - The exit code if the process exited abnormally. Only available for renderer processes. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/processes#event-onExited.
(tap-on-unresponsive-events channel & args)
Fired each time a process becomes unresponsive, providing the corrseponding Process object.
Events will be put on the |channel| with signature [::on-unresponsive [process]] where:
|process| - Details of the unresponsive process. Metrics requiring aggregation over time will not be populated in the object. Only available for renderer processes.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/processes#event-onUnresponsive.
Fired each time a process becomes unresponsive, providing the corrseponding Process object. Events will be put on the |channel| with signature [::on-unresponsive [process]] where: |process| - Details of the unresponsive process. Metrics requiring aggregation over time will not be populated in the object. Only available for renderer processes. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/processes#event-onUnresponsive.
(tap-on-updated-events channel & args)
Fired each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID.
Events will be put on the |channel| with signature [::on-updated [processes]] where:
|processes| - A dictionary of updated 'Process' objects for each live process in the browser, indexed by process ID. Metrics requiring aggregation over time will be populated in each Process object.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/processes#event-onUpdated.
Fired each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID. Events will be put on the |channel| with signature [::on-updated [processes]] where: |processes| - A dictionary of updated 'Process' objects for each live process in the browser, indexed by process ID. Metrics requiring aggregation over time will be populated in each Process object. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/processes#event-onUpdated.
(tap-on-updated-with-memory-events channel & args)
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. Note, collecting memory usage information incurs extra CPU usage and should only be listened for when needed.
Events will be put on the |channel| with signature [::on-updated-with-memory [processes]] where:
|processes| - A dictionary of updated 'Process' objects for each live process in the browser, indexed by process ID. Memory usage details will be included in each Process object.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/processes#event-onUpdatedWithMemory.
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. Note, collecting memory usage information incurs extra CPU usage and should only be listened for when needed. Events will be put on the |channel| with signature [::on-updated-with-memory [processes]] where: |processes| - A dictionary of updated 'Process' objects for each live process in the browser, indexed by process ID. Memory usage details will be included in each Process object. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/processes#event-onUpdatedWithMemory.
(terminate process-id)
Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
|process-id| - The ID of the process to be terminated.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [did-terminate] where:
|did-terminate| - True if terminating the process was successful, and false otherwise.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/processes#method-terminate.
Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL. |process-id| - The ID of the process to be terminated. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [did-terminate] where: |did-terminate| - True if terminating the process was successful, and false otherwise. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/processes#method-terminate.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close