Skip to main content

cdp_driver/methods/
extensions.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! Defines commands and events for browser extensions.
5//!
6//! Method names for the `Extensions` domain, for use with
7//! [`CdpClient::call`](crate::CdpClient::call).
8//!
9//! This domain is experimental and may change without notice.
10
11/// Runs an extension default action.
12///
13/// Parameters:
14/// - `id`: string
15/// - `targetId`: string
16pub const TRIGGER_ACTION: &str = "Extensions.triggerAction";
17
18/// Installs an unpacked extension from the filesystem similar to
19/// --load-extension CLI flags. Returns extension ID once the extension has
20/// been installed.
21///
22/// Parameters:
23/// - `path`: string
24/// - `enableInIncognito`: boolean (optional)
25///
26/// Returns: `id`
27pub const LOAD_UNPACKED: &str = "Extensions.loadUnpacked";
28
29/// Gets a list of all unpacked extensions.
30///
31/// Returns: `extensions`
32pub const GET_EXTENSIONS: &str = "Extensions.getExtensions";
33
34/// Uninstalls an unpacked extension (others not supported) from the profile.
35///
36/// Parameters:
37/// - `id`: string
38pub const UNINSTALL: &str = "Extensions.uninstall";
39
40/// Gets data from extension storage in the given `storageArea`. If `keys` is
41/// specified, these are used to filter the result.
42///
43/// Parameters:
44/// - `id`: string
45/// - `storageArea`: StorageArea
46/// - `keys`: array (optional)
47///
48/// Returns: `data`
49pub const GET_STORAGE_ITEMS: &str = "Extensions.getStorageItems";
50
51/// Removes `keys` from extension storage in the given `storageArea`.
52///
53/// Parameters:
54/// - `id`: string
55/// - `storageArea`: StorageArea
56/// - `keys`: array
57pub const REMOVE_STORAGE_ITEMS: &str = "Extensions.removeStorageItems";
58
59/// Clears extension storage in the given `storageArea`.
60///
61/// Parameters:
62/// - `id`: string
63/// - `storageArea`: StorageArea
64pub const CLEAR_STORAGE_ITEMS: &str = "Extensions.clearStorageItems";
65
66/// Sets `values` in extension storage in the given `storageArea`. The
67/// provided `values` will be merged with existing values in the storage area.
68///
69/// Parameters:
70/// - `id`: string
71/// - `storageArea`: StorageArea
72/// - `values`: object
73pub const SET_STORAGE_ITEMS: &str = "Extensions.setStorageItems";