1#![allow(dead_code)]
3use super::target;
4#[allow(unused_imports)]
5use super::types::*;
6#[allow(unused_imports)]
7use derive_builder::Builder;
8#[allow(unused_imports)]
9use serde::{Deserialize, Serialize};
10#[allow(unused_imports)]
11use serde_json::Value as Json;
12pub type BrowserContextId = String;
13pub type WindowId = JsUInt;
14#[allow(deprecated)]
15#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
16pub enum WindowState {
17 #[serde(rename = "normal")]
18 Normal,
19 #[serde(rename = "minimized")]
20 Minimized,
21 #[serde(rename = "maximized")]
22 Maximized,
23 #[serde(rename = "fullscreen")]
24 Fullscreen,
25}
26#[allow(deprecated)]
27#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
28pub enum PermissionType {
29 #[serde(rename = "ar")]
30 Ar,
31 #[serde(rename = "audioCapture")]
32 AudioCapture,
33 #[serde(rename = "automaticFullscreen")]
34 AutomaticFullscreen,
35 #[serde(rename = "backgroundFetch")]
36 BackgroundFetch,
37 #[serde(rename = "backgroundSync")]
38 BackgroundSync,
39 #[serde(rename = "cameraPanTiltZoom")]
40 CameraPanTiltZoom,
41 #[serde(rename = "capturedSurfaceControl")]
42 CapturedSurfaceControl,
43 #[serde(rename = "clipboardReadWrite")]
44 ClipboardReadWrite,
45 #[serde(rename = "clipboardSanitizedWrite")]
46 ClipboardSanitizedWrite,
47 #[serde(rename = "displayCapture")]
48 DisplayCapture,
49 #[serde(rename = "durableStorage")]
50 DurableStorage,
51 #[serde(rename = "geolocation")]
52 Geolocation,
53 #[serde(rename = "handTracking")]
54 HandTracking,
55 #[serde(rename = "idleDetection")]
56 IdleDetection,
57 #[serde(rename = "keyboardLock")]
58 KeyboardLock,
59 #[serde(rename = "localFonts")]
60 LocalFonts,
61 #[serde(rename = "localNetwork")]
62 LocalNetwork,
63 #[serde(rename = "localNetworkAccess")]
64 LocalNetworkAccess,
65 #[serde(rename = "loopbackNetwork")]
66 LoopbackNetwork,
67 #[serde(rename = "midi")]
68 Midi,
69 #[serde(rename = "midiSysex")]
70 MidiSysex,
71 #[serde(rename = "nfc")]
72 Nfc,
73 #[serde(rename = "notifications")]
74 Notifications,
75 #[serde(rename = "paymentHandler")]
76 PaymentHandler,
77 #[serde(rename = "periodicBackgroundSync")]
78 PeriodicBackgroundSync,
79 #[serde(rename = "pointerLock")]
80 PointerLock,
81 #[serde(rename = "protectedMediaIdentifier")]
82 ProtectedMediaIdentifier,
83 #[serde(rename = "sensors")]
84 Sensors,
85 #[serde(rename = "smartCard")]
86 SmartCard,
87 #[serde(rename = "speakerSelection")]
88 SpeakerSelection,
89 #[serde(rename = "storageAccess")]
90 StorageAccess,
91 #[serde(rename = "topLevelStorageAccess")]
92 TopLevelStorageAccess,
93 #[serde(rename = "videoCapture")]
94 VideoCapture,
95 #[serde(rename = "vr")]
96 Vr,
97 #[serde(rename = "wakeLockScreen")]
98 WakeLockScreen,
99 #[serde(rename = "wakeLockSystem")]
100 WakeLockSystem,
101 #[serde(rename = "webAppInstallation")]
102 WebAppInstallation,
103 #[serde(rename = "webPrinting")]
104 WebPrinting,
105 #[serde(rename = "windowManagement")]
106 WindowManagement,
107}
108#[allow(deprecated)]
109#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
110pub enum PermissionSetting {
111 #[serde(rename = "granted")]
112 Granted,
113 #[serde(rename = "denied")]
114 Denied,
115 #[serde(rename = "prompt")]
116 Prompt,
117}
118#[allow(deprecated)]
119#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
120pub enum BrowserCommandId {
121 #[serde(rename = "openTabSearch")]
122 OpenTabSearch,
123 #[serde(rename = "closeTabSearch")]
124 CloseTabSearch,
125 #[serde(rename = "openGlic")]
126 OpenGlic,
127}
128#[allow(deprecated)]
129#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
130pub enum PrivacySandboxApi {
131 #[serde(rename = "BiddingAndAuctionServices")]
132 BiddingAndAuctionServices,
133 #[serde(rename = "TrustedKeyValue")]
134 TrustedKeyValue,
135}
136#[allow(deprecated)]
137#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
138pub enum SetDownloadBehaviorBehaviorOption {
139 #[serde(rename = "deny")]
140 Deny,
141 #[serde(rename = "allow")]
142 Allow,
143 #[serde(rename = "allowAndName")]
144 AllowAndName,
145 #[serde(rename = "default")]
146 Default,
147}
148#[allow(deprecated)]
149#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
150pub enum DownloadProgressStateOption {
151 #[serde(rename = "inProgress")]
152 InProgress,
153 #[serde(rename = "completed")]
154 Completed,
155 #[serde(rename = "canceled")]
156 Canceled,
157}
158#[allow(deprecated)]
159#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
160#[builder(setter(into, strip_option))]
161#[serde(rename_all = "camelCase")]
162#[doc = "Browser window bounds information"]
163pub struct Bounds {
164 #[builder(default)]
165 #[serde(skip_serializing_if = "Option::is_none")]
166 #[serde(default)]
167 #[doc = "The offset from the left edge of the screen to the window in pixels."]
168 pub left: Option<JsUInt>,
169 #[builder(default)]
170 #[serde(skip_serializing_if = "Option::is_none")]
171 #[serde(default)]
172 #[doc = "The offset from the top edge of the screen to the window in pixels."]
173 pub top: Option<JsUInt>,
174 #[builder(default)]
175 #[serde(skip_serializing_if = "Option::is_none")]
176 #[serde(default)]
177 #[doc = "The window width in pixels."]
178 pub width: Option<JsUInt>,
179 #[builder(default)]
180 #[serde(skip_serializing_if = "Option::is_none")]
181 #[serde(default)]
182 #[doc = "The window height in pixels."]
183 pub height: Option<JsUInt>,
184 #[builder(default)]
185 #[serde(skip_serializing_if = "Option::is_none")]
186 #[doc = "The window state. Default to normal."]
187 pub window_state: Option<WindowState>,
188}
189#[allow(deprecated)]
190#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
191#[builder(setter(into, strip_option))]
192#[serde(rename_all = "camelCase")]
193#[doc = "Definition of PermissionDescriptor defined in the Permissions API:\n <https://w3c.github.io/permissions/#dom-permissiondescriptor>."]
194pub struct PermissionDescriptor {
195 #[serde(default)]
196 #[doc = "Name of permission.\n See <https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl> for valid permission names."]
197 pub name: String,
198 #[builder(default)]
199 #[serde(skip_serializing_if = "Option::is_none")]
200 #[serde(default)]
201 #[doc = "For \"midi\" permission, may also specify sysex control."]
202 pub sysex: Option<bool>,
203 #[builder(default)]
204 #[serde(skip_serializing_if = "Option::is_none")]
205 #[serde(default)]
206 #[doc = "For \"push\" permission, may specify userVisibleOnly.\n Note that userVisibleOnly = true is the only currently supported type."]
207 pub user_visible_only: Option<bool>,
208 #[builder(default)]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 #[serde(default)]
211 #[doc = "For \"clipboard\" permission, may specify allowWithoutSanitization."]
212 pub allow_without_sanitization: Option<bool>,
213 #[builder(default)]
214 #[serde(skip_serializing_if = "Option::is_none")]
215 #[serde(default)]
216 #[doc = "For \"fullscreen\" permission, must specify allowWithoutGesture:true."]
217 pub allow_without_gesture: Option<bool>,
218 #[builder(default)]
219 #[serde(skip_serializing_if = "Option::is_none")]
220 #[serde(default)]
221 #[doc = "For \"camera\" permission, may specify panTiltZoom."]
222 pub pan_tilt_zoom: Option<bool>,
223}
224#[allow(deprecated)]
225#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
226#[builder(setter(into, strip_option))]
227#[serde(rename_all = "camelCase")]
228#[doc = "Chrome histogram bucket."]
229pub struct Bucket {
230 #[serde(default)]
231 #[doc = "Minimum value (inclusive)."]
232 pub low: JsUInt,
233 #[serde(default)]
234 #[doc = "Maximum value (exclusive)."]
235 pub high: JsUInt,
236 #[serde(default)]
237 #[doc = "Number of samples."]
238 pub count: JsUInt,
239}
240#[allow(deprecated)]
241#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
242#[builder(setter(into, strip_option))]
243#[serde(rename_all = "camelCase")]
244#[doc = "Chrome histogram."]
245pub struct Histogram {
246 #[serde(default)]
247 #[doc = "Name."]
248 pub name: String,
249 #[serde(default)]
250 #[doc = "Sum of sample values."]
251 pub sum: JsUInt,
252 #[serde(default)]
253 #[doc = "Total number of samples."]
254 pub count: JsUInt,
255 #[doc = "Buckets."]
256 pub buckets: Vec<Bucket>,
257}
258#[allow(deprecated)]
259#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
260#[builder(setter(into, strip_option))]
261#[serde(rename_all = "camelCase")]
262#[doc = "Set permission settings for given embedding and embedded origins."]
263pub struct SetPermission {
264 #[doc = "Descriptor of permission to override."]
265 pub permission: PermissionDescriptor,
266 #[doc = "Setting of the permission."]
267 pub setting: PermissionSetting,
268 #[builder(default)]
269 #[serde(skip_serializing_if = "Option::is_none")]
270 #[serde(default)]
271 #[doc = "Embedding origin the permission applies to, all origins if not specified."]
272 pub origin: Option<String>,
273 #[builder(default)]
274 #[serde(skip_serializing_if = "Option::is_none")]
275 #[serde(default)]
276 #[doc = "Embedded origin the permission applies to. It is ignored unless the embedding origin is\n present and valid. If the embedding origin is provided but the embedded origin isn't, the\n embedding origin is used as the embedded origin."]
277 pub embedded_origin: Option<String>,
278 #[builder(default)]
279 #[serde(skip_serializing_if = "Option::is_none")]
280 #[doc = "Context to override. When omitted, default browser context is used."]
281 pub browser_context_id: Option<BrowserContextId>,
282}
283#[allow(deprecated)]
284#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
285#[builder(setter(into, strip_option))]
286#[serde(rename_all = "camelCase")]
287#[doc = "Grant specific permissions to the given origin and reject all others. Deprecated. Use\n setPermission instead."]
288#[deprecated]
289pub struct GrantPermissions {
290 pub permissions: Vec<PermissionType>,
291 #[builder(default)]
292 #[serde(skip_serializing_if = "Option::is_none")]
293 #[serde(default)]
294 #[doc = "Origin the permission applies to, all origins if not specified."]
295 pub origin: Option<String>,
296 #[builder(default)]
297 #[serde(skip_serializing_if = "Option::is_none")]
298 #[doc = "BrowserContext to override permissions. When omitted, default browser context is used."]
299 pub browser_context_id: Option<BrowserContextId>,
300}
301#[allow(deprecated)]
302#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
303#[builder(setter(into, strip_option))]
304#[serde(rename_all = "camelCase")]
305#[doc = "Reset all permission management for all origins."]
306pub struct ResetPermissions {
307 #[builder(default)]
308 #[serde(skip_serializing_if = "Option::is_none")]
309 #[doc = "BrowserContext to reset permissions. When omitted, default browser context is used."]
310 pub browser_context_id: Option<BrowserContextId>,
311}
312#[allow(deprecated)]
313#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
314#[builder(setter(into, strip_option))]
315#[serde(rename_all = "camelCase")]
316#[doc = "Set the behavior when downloading a file."]
317pub struct SetDownloadBehavior {
318 #[doc = "Whether to allow all or deny all download requests, or use default Chrome behavior if\n available (otherwise deny). |allowAndName| allows download and names files according to\n their download guids."]
319 pub behavior: SetDownloadBehaviorBehaviorOption,
320 #[builder(default)]
321 #[serde(skip_serializing_if = "Option::is_none")]
322 #[doc = "BrowserContext to set download behavior. When omitted, default browser context is used."]
323 pub browser_context_id: Option<BrowserContextId>,
324 #[builder(default)]
325 #[serde(skip_serializing_if = "Option::is_none")]
326 #[serde(default)]
327 #[doc = "The default path to save downloaded files to. This is required if behavior is set to 'allow'\n or 'allowAndName'."]
328 pub download_path: Option<String>,
329 #[builder(default)]
330 #[serde(skip_serializing_if = "Option::is_none")]
331 #[serde(default)]
332 #[doc = "Whether to emit download events (defaults to false)."]
333 pub events_enabled: Option<bool>,
334}
335#[allow(deprecated)]
336#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
337#[builder(setter(into, strip_option))]
338#[serde(rename_all = "camelCase")]
339#[doc = "Cancel a download if in progress"]
340pub struct CancelDownload {
341 #[serde(default)]
342 #[doc = "Global unique identifier of the download."]
343 pub guid: String,
344 #[builder(default)]
345 #[serde(skip_serializing_if = "Option::is_none")]
346 #[doc = "BrowserContext to perform the action in. When omitted, default browser context is used."]
347 pub browser_context_id: Option<BrowserContextId>,
348}
349#[allow(deprecated)]
350#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
351pub struct Close(pub Option<Json>);
352#[allow(deprecated)]
353#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
354pub struct Crash(pub Option<Json>);
355#[allow(deprecated)]
356#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
357pub struct CrashGpuProcess(pub Option<Json>);
358#[allow(deprecated)]
359#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
360pub struct GetVersion(pub Option<Json>);
361#[allow(deprecated)]
362#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
363pub struct GetBrowserCommandLine(pub Option<Json>);
364#[allow(deprecated)]
365#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
366#[builder(setter(into, strip_option))]
367#[serde(rename_all = "camelCase")]
368#[doc = "Get Chrome histograms."]
369pub struct GetHistograms {
370 #[builder(default)]
371 #[serde(skip_serializing_if = "Option::is_none")]
372 #[serde(default)]
373 #[doc = "Requested substring in name. Only histograms which have query as a\n substring in their name are extracted. An empty or absent query returns\n all histograms."]
374 pub query: Option<String>,
375 #[builder(default)]
376 #[serde(skip_serializing_if = "Option::is_none")]
377 #[serde(default)]
378 #[doc = "If true, retrieve delta since last delta call."]
379 pub delta: Option<bool>,
380}
381#[allow(deprecated)]
382#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
383#[builder(setter(into, strip_option))]
384#[serde(rename_all = "camelCase")]
385#[doc = "Get a Chrome histogram by name."]
386pub struct GetHistogram {
387 #[serde(default)]
388 #[doc = "Requested histogram name."]
389 pub name: String,
390 #[builder(default)]
391 #[serde(skip_serializing_if = "Option::is_none")]
392 #[serde(default)]
393 #[doc = "If true, retrieve delta since last delta call."]
394 pub delta: Option<bool>,
395}
396#[allow(deprecated)]
397#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
398#[builder(setter(into, strip_option))]
399#[serde(rename_all = "camelCase")]
400#[doc = "Get position and size of the browser window."]
401pub struct GetWindowBounds {
402 #[doc = "Browser window id."]
403 pub window_id: WindowId,
404}
405#[allow(deprecated)]
406#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
407#[builder(setter(into, strip_option))]
408#[serde(rename_all = "camelCase")]
409#[doc = "Get the browser window that contains the devtools target."]
410pub struct GetWindowForTarget {
411 #[builder(default)]
412 #[serde(skip_serializing_if = "Option::is_none")]
413 #[doc = "Devtools agent host id. If called as a part of the session, associated targetId is used."]
414 pub target_id: Option<target::TargetId>,
415}
416#[allow(deprecated)]
417#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
418#[builder(setter(into, strip_option))]
419#[serde(rename_all = "camelCase")]
420#[doc = "Set position and/or size of the browser window."]
421pub struct SetWindowBounds {
422 #[doc = "Browser window id."]
423 pub window_id: WindowId,
424 #[doc = "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined\n with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged."]
425 pub bounds: Bounds,
426}
427#[allow(deprecated)]
428#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
429#[builder(setter(into, strip_option))]
430#[serde(rename_all = "camelCase")]
431#[doc = "Set size of the browser contents resizing browser window as necessary."]
432pub struct SetContentsSize {
433 #[doc = "Browser window id."]
434 pub window_id: WindowId,
435 #[builder(default)]
436 #[serde(skip_serializing_if = "Option::is_none")]
437 #[serde(default)]
438 #[doc = "The window contents width in DIP. Assumes current width if omitted.\n Must be specified if 'height' is omitted."]
439 pub width: Option<JsUInt>,
440 #[builder(default)]
441 #[serde(skip_serializing_if = "Option::is_none")]
442 #[serde(default)]
443 #[doc = "The window contents height in DIP. Assumes current height if omitted.\n Must be specified if 'width' is omitted."]
444 pub height: Option<JsUInt>,
445}
446#[allow(deprecated)]
447#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
448#[builder(setter(into, strip_option))]
449#[serde(rename_all = "camelCase")]
450#[doc = "Set dock tile details, platform-specific."]
451pub struct SetDockTile {
452 #[builder(default)]
453 #[serde(skip_serializing_if = "Option::is_none")]
454 #[serde(default)]
455 pub badge_label: Option<String>,
456 #[builder(default)]
457 #[serde(skip_serializing_if = "Option::is_none")]
458 #[doc = "Png encoded image."]
459 pub image: Option<Vec<u8>>,
460}
461#[allow(deprecated)]
462#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
463#[builder(setter(into, strip_option))]
464#[serde(rename_all = "camelCase")]
465#[doc = "Invoke custom browser commands used by telemetry."]
466pub struct ExecuteBrowserCommand {
467 pub command_id: BrowserCommandId,
468}
469#[allow(deprecated)]
470#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
471#[builder(setter(into, strip_option))]
472#[serde(rename_all = "camelCase")]
473#[doc = "Allows a site to use privacy sandbox features that require enrollment\n without the site actually being enrolled. Only supported on page targets."]
474pub struct AddPrivacySandboxEnrollmentOverride {
475 #[serde(default)]
476 pub url: String,
477}
478#[allow(deprecated)]
479#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
480#[builder(setter(into, strip_option))]
481#[serde(rename_all = "camelCase")]
482#[doc = "Configures encryption keys used with a given privacy sandbox API to talk\n to a trusted coordinator. Since this is intended for test automation only,\n coordinatorOrigin must be a .test domain. No existing coordinator\n configuration for the origin may exist."]
483pub struct AddPrivacySandboxCoordinatorKeyConfig {
484 pub api: PrivacySandboxApi,
485 #[serde(default)]
486 pub coordinator_origin: String,
487 #[serde(default)]
488 pub key_config: String,
489 #[builder(default)]
490 #[serde(skip_serializing_if = "Option::is_none")]
491 #[doc = "BrowserContext to perform the action in. When omitted, default browser\n context is used."]
492 pub browser_context_id: Option<BrowserContextId>,
493}
494#[allow(deprecated)]
495#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
496#[doc = "Set permission settings for given embedding and embedded origins."]
497pub struct SetPermissionReturnObject(pub Option<Json>);
498#[allow(deprecated)]
499#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
500#[doc = "Grant specific permissions to the given origin and reject all others. Deprecated. Use\n setPermission instead."]
501#[deprecated]
502pub struct GrantPermissionsReturnObject(pub Option<Json>);
503#[allow(deprecated)]
504#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
505#[doc = "Reset all permission management for all origins."]
506pub struct ResetPermissionsReturnObject(pub Option<Json>);
507#[allow(deprecated)]
508#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
509#[doc = "Set the behavior when downloading a file."]
510pub struct SetDownloadBehaviorReturnObject(pub Option<Json>);
511#[allow(deprecated)]
512#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
513#[doc = "Cancel a download if in progress"]
514pub struct CancelDownloadReturnObject(pub Option<Json>);
515#[allow(deprecated)]
516#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
517#[doc = "Close browser gracefully."]
518pub struct CloseReturnObject(pub Option<Json>);
519#[allow(deprecated)]
520#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
521#[doc = "Crashes browser on the main thread."]
522pub struct CrashReturnObject(pub Option<Json>);
523#[allow(deprecated)]
524#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
525#[doc = "Crashes GPU process."]
526pub struct CrashGpuProcessReturnObject(pub Option<Json>);
527#[allow(deprecated)]
528#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
529#[serde(rename_all = "camelCase")]
530#[doc = "Returns version information."]
531pub struct GetVersionReturnObject {
532 #[serde(default)]
533 #[doc = "Protocol version."]
534 pub protocol_version: String,
535 #[serde(default)]
536 #[doc = "Product name."]
537 pub product: String,
538 #[serde(default)]
539 #[doc = "Product revision."]
540 pub revision: String,
541 #[serde(default)]
542 #[doc = "User-Agent."]
543 pub user_agent: String,
544 #[serde(default)]
545 #[doc = "V8 version."]
546 pub js_version: String,
547}
548#[allow(deprecated)]
549#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
550#[serde(rename_all = "camelCase")]
551#[doc = "Returns the command line switches for the browser process if, and only if\n --enable-automation is on the commandline."]
552pub struct GetBrowserCommandLineReturnObject {
553 #[doc = "Commandline parameters"]
554 pub arguments: Vec<String>,
555}
556#[allow(deprecated)]
557#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
558#[serde(rename_all = "camelCase")]
559#[doc = "Get Chrome histograms."]
560pub struct GetHistogramsReturnObject {
561 #[doc = "Histograms."]
562 pub histograms: Vec<Histogram>,
563}
564#[allow(deprecated)]
565#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
566#[serde(rename_all = "camelCase")]
567#[doc = "Get a Chrome histogram by name."]
568pub struct GetHistogramReturnObject {
569 #[doc = "Histogram."]
570 pub histogram: Histogram,
571}
572#[allow(deprecated)]
573#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
574#[serde(rename_all = "camelCase")]
575#[doc = "Get position and size of the browser window."]
576pub struct GetWindowBoundsReturnObject {
577 #[doc = "Bounds information of the window. When window state is 'minimized', the restored window\n position and size are returned."]
578 pub bounds: Bounds,
579}
580#[allow(deprecated)]
581#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
582#[serde(rename_all = "camelCase")]
583#[doc = "Get the browser window that contains the devtools target."]
584pub struct GetWindowForTargetReturnObject {
585 #[doc = "Browser window id."]
586 pub window_id: WindowId,
587 #[doc = "Bounds information of the window. When window state is 'minimized', the restored window\n position and size are returned."]
588 pub bounds: Bounds,
589}
590#[allow(deprecated)]
591#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
592#[doc = "Set position and/or size of the browser window."]
593pub struct SetWindowBoundsReturnObject(pub Option<Json>);
594#[allow(deprecated)]
595#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
596#[doc = "Set size of the browser contents resizing browser window as necessary."]
597pub struct SetContentsSizeReturnObject(pub Option<Json>);
598#[allow(deprecated)]
599#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
600#[doc = "Set dock tile details, platform-specific."]
601pub struct SetDockTileReturnObject(pub Option<Json>);
602#[allow(deprecated)]
603#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
604#[doc = "Invoke custom browser commands used by telemetry."]
605pub struct ExecuteBrowserCommandReturnObject(pub Option<Json>);
606#[allow(deprecated)]
607#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
608#[doc = "Allows a site to use privacy sandbox features that require enrollment\n without the site actually being enrolled. Only supported on page targets."]
609pub struct AddPrivacySandboxEnrollmentOverrideReturnObject(pub Option<Json>);
610#[allow(deprecated)]
611#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
612#[doc = "Configures encryption keys used with a given privacy sandbox API to talk\n to a trusted coordinator. Since this is intended for test automation only,\n coordinatorOrigin must be a .test domain. No existing coordinator\n configuration for the origin may exist."]
613pub struct AddPrivacySandboxCoordinatorKeyConfigReturnObject(pub Option<Json>);
614#[allow(deprecated)]
615impl Method for SetPermission {
616 const NAME: &'static str = "Browser.setPermission";
617 type ReturnObject = SetPermissionReturnObject;
618}
619#[allow(deprecated)]
620impl Method for GrantPermissions {
621 const NAME: &'static str = "Browser.grantPermissions";
622 type ReturnObject = GrantPermissionsReturnObject;
623}
624#[allow(deprecated)]
625impl Method for ResetPermissions {
626 const NAME: &'static str = "Browser.resetPermissions";
627 type ReturnObject = ResetPermissionsReturnObject;
628}
629#[allow(deprecated)]
630impl Method for SetDownloadBehavior {
631 const NAME: &'static str = "Browser.setDownloadBehavior";
632 type ReturnObject = SetDownloadBehaviorReturnObject;
633}
634#[allow(deprecated)]
635impl Method for CancelDownload {
636 const NAME: &'static str = "Browser.cancelDownload";
637 type ReturnObject = CancelDownloadReturnObject;
638}
639#[allow(deprecated)]
640impl Method for Close {
641 const NAME: &'static str = "Browser.close";
642 type ReturnObject = CloseReturnObject;
643}
644#[allow(deprecated)]
645impl Method for Crash {
646 const NAME: &'static str = "Browser.crash";
647 type ReturnObject = CrashReturnObject;
648}
649#[allow(deprecated)]
650impl Method for CrashGpuProcess {
651 const NAME: &'static str = "Browser.crashGpuProcess";
652 type ReturnObject = CrashGpuProcessReturnObject;
653}
654#[allow(deprecated)]
655impl Method for GetVersion {
656 const NAME: &'static str = "Browser.getVersion";
657 type ReturnObject = GetVersionReturnObject;
658}
659#[allow(deprecated)]
660impl Method for GetBrowserCommandLine {
661 const NAME: &'static str = "Browser.getBrowserCommandLine";
662 type ReturnObject = GetBrowserCommandLineReturnObject;
663}
664#[allow(deprecated)]
665impl Method for GetHistograms {
666 const NAME: &'static str = "Browser.getHistograms";
667 type ReturnObject = GetHistogramsReturnObject;
668}
669#[allow(deprecated)]
670impl Method for GetHistogram {
671 const NAME: &'static str = "Browser.getHistogram";
672 type ReturnObject = GetHistogramReturnObject;
673}
674#[allow(deprecated)]
675impl Method for GetWindowBounds {
676 const NAME: &'static str = "Browser.getWindowBounds";
677 type ReturnObject = GetWindowBoundsReturnObject;
678}
679#[allow(deprecated)]
680impl Method for GetWindowForTarget {
681 const NAME: &'static str = "Browser.getWindowForTarget";
682 type ReturnObject = GetWindowForTargetReturnObject;
683}
684#[allow(deprecated)]
685impl Method for SetWindowBounds {
686 const NAME: &'static str = "Browser.setWindowBounds";
687 type ReturnObject = SetWindowBoundsReturnObject;
688}
689#[allow(deprecated)]
690impl Method for SetContentsSize {
691 const NAME: &'static str = "Browser.setContentsSize";
692 type ReturnObject = SetContentsSizeReturnObject;
693}
694#[allow(deprecated)]
695impl Method for SetDockTile {
696 const NAME: &'static str = "Browser.setDockTile";
697 type ReturnObject = SetDockTileReturnObject;
698}
699#[allow(deprecated)]
700impl Method for ExecuteBrowserCommand {
701 const NAME: &'static str = "Browser.executeBrowserCommand";
702 type ReturnObject = ExecuteBrowserCommandReturnObject;
703}
704#[allow(deprecated)]
705impl Method for AddPrivacySandboxEnrollmentOverride {
706 const NAME: &'static str = "Browser.addPrivacySandboxEnrollmentOverride";
707 type ReturnObject = AddPrivacySandboxEnrollmentOverrideReturnObject;
708}
709#[allow(deprecated)]
710impl Method for AddPrivacySandboxCoordinatorKeyConfig {
711 const NAME: &'static str = "Browser.addPrivacySandboxCoordinatorKeyConfig";
712 type ReturnObject = AddPrivacySandboxCoordinatorKeyConfigReturnObject;
713}
714#[allow(dead_code)]
715pub mod events {
716 #[allow(unused_imports)]
717 use super::super::types::*;
718 #[allow(unused_imports)]
719 use derive_builder::Builder;
720 #[allow(unused_imports)]
721 use serde::{Deserialize, Serialize};
722 #[allow(unused_imports)]
723 use serde_json::Value as Json;
724 #[allow(deprecated)]
725 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
726 pub struct DownloadWillBeginEvent {
727 pub params: DownloadWillBeginEventParams,
728 }
729 #[allow(deprecated)]
730 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
731 #[serde(rename_all = "camelCase")]
732 pub struct DownloadWillBeginEventParams {
733 #[doc = "Id of the frame that caused the download to begin."]
734 pub frame_id: super::super::page::FrameId,
735 #[serde(default)]
736 #[doc = "Global unique identifier of the download."]
737 pub guid: String,
738 #[serde(default)]
739 #[doc = "URL of the resource being downloaded."]
740 pub url: String,
741 #[serde(default)]
742 #[doc = "Suggested file name of the resource (the actual name of the file saved on disk may differ)."]
743 pub suggested_filename: String,
744 }
745 #[allow(deprecated)]
746 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
747 pub struct DownloadProgressEvent {
748 pub params: DownloadProgressEventParams,
749 }
750 #[allow(deprecated)]
751 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
752 #[serde(rename_all = "camelCase")]
753 pub struct DownloadProgressEventParams {
754 #[serde(default)]
755 #[doc = "Global unique identifier of the download."]
756 pub guid: String,
757 #[serde(default)]
758 #[doc = "Total expected bytes to download."]
759 pub total_bytes: JsFloat,
760 #[serde(default)]
761 #[doc = "Total bytes received."]
762 pub received_bytes: JsFloat,
763 #[doc = "Download status."]
764 pub state: super::DownloadProgressStateOption,
765 #[builder(default)]
766 #[serde(skip_serializing_if = "Option::is_none")]
767 #[serde(default)]
768 #[doc = "If download is \"completed\", provides the path of the downloaded file.\n Depending on the platform, it is not guaranteed to be set, nor the file\n is guaranteed to exist."]
769 pub file_path: Option<String>,
770 }
771}