1#![allow(dead_code)]
3use super::debugger;
4use super::dom;
5use super::emulation;
6use super::io;
7use super::network;
8use super::runtime;
9#[allow(unused_imports)]
10use super::types::*;
11#[allow(unused_imports)]
12use derive_builder::Builder;
13#[allow(unused_imports)]
14use serde::{Deserialize, Serialize};
15#[allow(unused_imports)]
16use serde_json::Value as Json;
17pub type FrameId = String;
18pub type ScriptIdentifier = String;
19#[allow(deprecated)]
20#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
21pub enum AdFrameType {
22 #[serde(rename = "none")]
23 None,
24 #[serde(rename = "child")]
25 Child,
26 #[serde(rename = "root")]
27 Root,
28}
29#[allow(deprecated)]
30#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
31pub enum AdFrameExplanation {
32 #[serde(rename = "ParentIsAd")]
33 ParentIsAd,
34 #[serde(rename = "CreatedByAdScript")]
35 CreatedByAdScript,
36 #[serde(rename = "MatchedBlockingRule")]
37 MatchedBlockingRule,
38}
39#[allow(deprecated)]
40#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
41pub enum SecureContextType {
42 #[serde(rename = "Secure")]
43 Secure,
44 #[serde(rename = "SecureLocalhost")]
45 SecureLocalhost,
46 #[serde(rename = "InsecureScheme")]
47 InsecureScheme,
48 #[serde(rename = "InsecureAncestor")]
49 InsecureAncestor,
50}
51#[allow(deprecated)]
52#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
53pub enum CrossOriginIsolatedContextType {
54 #[serde(rename = "Isolated")]
55 Isolated,
56 #[serde(rename = "NotIsolated")]
57 NotIsolated,
58 #[serde(rename = "NotIsolatedFeatureDisabled")]
59 NotIsolatedFeatureDisabled,
60}
61#[allow(deprecated)]
62#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
63pub enum GatedApiFeatures {
64 #[serde(rename = "SharedArrayBuffers")]
65 SharedArrayBuffers,
66 #[serde(rename = "SharedArrayBuffersTransferAllowed")]
67 SharedArrayBuffersTransferAllowed,
68 #[serde(rename = "PerformanceMeasureMemory")]
69 PerformanceMeasureMemory,
70 #[serde(rename = "PerformanceProfile")]
71 PerformanceProfile,
72}
73#[allow(deprecated)]
74#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
75pub enum PermissionsPolicyFeature {
76 #[serde(rename = "accelerometer")]
77 Accelerometer,
78 #[serde(rename = "all-screens-capture")]
79 AllScreensCapture,
80 #[serde(rename = "ambient-light-sensor")]
81 AmbientLightSensor,
82 #[serde(rename = "aria-notify")]
83 AriaNotify,
84 #[serde(rename = "attribution-reporting")]
85 AttributionReporting,
86 #[serde(rename = "autofill")]
87 Autofill,
88 #[serde(rename = "autoplay")]
89 Autoplay,
90 #[serde(rename = "bluetooth")]
91 Bluetooth,
92 #[serde(rename = "browsing-topics")]
93 BrowsingTopics,
94 #[serde(rename = "camera")]
95 Camera,
96 #[serde(rename = "captured-surface-control")]
97 CapturedSurfaceControl,
98 #[serde(rename = "ch-dpr")]
99 ChDpr,
100 #[serde(rename = "ch-device-memory")]
101 ChDeviceMemory,
102 #[serde(rename = "ch-downlink")]
103 ChDownlink,
104 #[serde(rename = "ch-ect")]
105 ChEct,
106 #[serde(rename = "ch-prefers-color-scheme")]
107 ChPrefersColorScheme,
108 #[serde(rename = "ch-prefers-reduced-motion")]
109 ChPrefersReducedMotion,
110 #[serde(rename = "ch-prefers-reduced-transparency")]
111 ChPrefersReducedTransparency,
112 #[serde(rename = "ch-rtt")]
113 ChRtt,
114 #[serde(rename = "ch-save-data")]
115 ChSaveData,
116 #[serde(rename = "ch-ua")]
117 ChUa,
118 #[serde(rename = "ch-ua-arch")]
119 ChUaArch,
120 #[serde(rename = "ch-ua-bitness")]
121 ChUaBitness,
122 #[serde(rename = "ch-ua-high-entropy-values")]
123 ChUaHighEntropyValues,
124 #[serde(rename = "ch-ua-platform")]
125 ChUaPlatform,
126 #[serde(rename = "ch-ua-model")]
127 ChUaModel,
128 #[serde(rename = "ch-ua-mobile")]
129 ChUaMobile,
130 #[serde(rename = "ch-ua-form-factors")]
131 ChUaFormFactors,
132 #[serde(rename = "ch-ua-full-version")]
133 ChUaFullVersion,
134 #[serde(rename = "ch-ua-full-version-list")]
135 ChUaFullVersionList,
136 #[serde(rename = "ch-ua-platform-version")]
137 ChUaPlatformVersion,
138 #[serde(rename = "ch-ua-wow64")]
139 ChUaWow64,
140 #[serde(rename = "ch-viewport-height")]
141 ChViewportHeight,
142 #[serde(rename = "ch-viewport-width")]
143 ChViewportWidth,
144 #[serde(rename = "ch-width")]
145 ChWidth,
146 #[serde(rename = "clipboard-read")]
147 ClipboardRead,
148 #[serde(rename = "clipboard-write")]
149 ClipboardWrite,
150 #[serde(rename = "compute-pressure")]
151 ComputePressure,
152 #[serde(rename = "controlled-frame")]
153 ControlledFrame,
154 #[serde(rename = "cross-origin-isolated")]
155 CrossOriginIsolated,
156 #[serde(rename = "deferred-fetch")]
157 DeferredFetch,
158 #[serde(rename = "deferred-fetch-minimal")]
159 DeferredFetchMinimal,
160 #[serde(rename = "device-attributes")]
161 DeviceAttributes,
162 #[serde(rename = "digital-credentials-create")]
163 DigitalCredentialsCreate,
164 #[serde(rename = "digital-credentials-get")]
165 DigitalCredentialsGet,
166 #[serde(rename = "direct-sockets")]
167 DirectSockets,
168 #[serde(rename = "direct-sockets-multicast")]
169 DirectSocketsMulticast,
170 #[serde(rename = "direct-sockets-private")]
171 DirectSocketsPrivate,
172 #[serde(rename = "display-capture")]
173 DisplayCapture,
174 #[serde(rename = "document-domain")]
175 DocumentDomain,
176 #[serde(rename = "encrypted-media")]
177 EncryptedMedia,
178 #[serde(rename = "execution-while-out-of-viewport")]
179 ExecutionWhileOutOfViewport,
180 #[serde(rename = "execution-while-not-rendered")]
181 ExecutionWhileNotRendered,
182 #[serde(rename = "fenced-unpartitioned-storage-read")]
183 FencedUnpartitionedStorageRead,
184 #[serde(rename = "focus-without-user-activation")]
185 FocusWithoutUserActivation,
186 #[serde(rename = "fullscreen")]
187 Fullscreen,
188 #[serde(rename = "frobulate")]
189 Frobulate,
190 #[serde(rename = "gamepad")]
191 Gamepad,
192 #[serde(rename = "geolocation")]
193 Geolocation,
194 #[serde(rename = "gyroscope")]
195 Gyroscope,
196 #[serde(rename = "hid")]
197 Hid,
198 #[serde(rename = "identity-credentials-get")]
199 IdentityCredentialsGet,
200 #[serde(rename = "idle-detection")]
201 IdleDetection,
202 #[serde(rename = "interest-cohort")]
203 InterestCohort,
204 #[serde(rename = "join-ad-interest-group")]
205 JoinAdInterestGroup,
206 #[serde(rename = "keyboard-map")]
207 KeyboardMap,
208 #[serde(rename = "language-detector")]
209 LanguageDetector,
210 #[serde(rename = "language-model")]
211 LanguageModel,
212 #[serde(rename = "local-fonts")]
213 LocalFonts,
214 #[serde(rename = "local-network")]
215 LocalNetwork,
216 #[serde(rename = "local-network-access")]
217 LocalNetworkAccess,
218 #[serde(rename = "loopback-network")]
219 LoopbackNetwork,
220 #[serde(rename = "magnetometer")]
221 Magnetometer,
222 #[serde(rename = "manual-text")]
223 ManualText,
224 #[serde(rename = "media-playback-while-not-visible")]
225 MediaPlaybackWhileNotVisible,
226 #[serde(rename = "microphone")]
227 Microphone,
228 #[serde(rename = "midi")]
229 Midi,
230 #[serde(rename = "on-device-speech-recognition")]
231 OnDeviceSpeechRecognition,
232 #[serde(rename = "otp-credentials")]
233 OtpCredentials,
234 #[serde(rename = "payment")]
235 Payment,
236 #[serde(rename = "picture-in-picture")]
237 PictureInPicture,
238 #[serde(rename = "private-aggregation")]
239 PrivateAggregation,
240 #[serde(rename = "private-state-token-issuance")]
241 PrivateStateTokenIssuance,
242 #[serde(rename = "private-state-token-redemption")]
243 PrivateStateTokenRedemption,
244 #[serde(rename = "publickey-credentials-create")]
245 PublickeyCredentialsCreate,
246 #[serde(rename = "publickey-credentials-get")]
247 PublickeyCredentialsGet,
248 #[serde(rename = "record-ad-auction-events")]
249 RecordAdAuctionEvents,
250 #[serde(rename = "rewriter")]
251 Rewriter,
252 #[serde(rename = "run-ad-auction")]
253 RunAdAuction,
254 #[serde(rename = "screen-wake-lock")]
255 ScreenWakeLock,
256 #[serde(rename = "serial")]
257 Serial,
258 #[serde(rename = "shared-storage")]
259 SharedStorage,
260 #[serde(rename = "shared-storage-select-url")]
261 SharedStorageSelectUrl,
262 #[serde(rename = "smart-card")]
263 SmartCard,
264 #[serde(rename = "speaker-selection")]
265 SpeakerSelection,
266 #[serde(rename = "storage-access")]
267 StorageAccess,
268 #[serde(rename = "sub-apps")]
269 SubApps,
270 #[serde(rename = "summarizer")]
271 Summarizer,
272 #[serde(rename = "sync-xhr")]
273 SyncXhr,
274 #[serde(rename = "translator")]
275 Translator,
276 #[serde(rename = "unload")]
277 Unload,
278 #[serde(rename = "usb")]
279 Usb,
280 #[serde(rename = "usb-unrestricted")]
281 UsbUnrestricted,
282 #[serde(rename = "vertical-scroll")]
283 VerticalScroll,
284 #[serde(rename = "web-app-installation")]
285 WebAppInstallation,
286 #[serde(rename = "web-printing")]
287 WebPrinting,
288 #[serde(rename = "web-share")]
289 WebShare,
290 #[serde(rename = "window-management")]
291 WindowManagement,
292 #[serde(rename = "writer")]
293 Writer,
294 #[serde(rename = "xr-spatial-tracking")]
295 XrSpatialTracking,
296}
297#[allow(deprecated)]
298#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
299pub enum PermissionsPolicyBlockReason {
300 #[serde(rename = "Header")]
301 Header,
302 #[serde(rename = "IframeAttribute")]
303 IframeAttribute,
304 #[serde(rename = "InFencedFrameTree")]
305 InFencedFrameTree,
306 #[serde(rename = "InIsolatedApp")]
307 InIsolatedApp,
308}
309#[allow(deprecated)]
310#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
311pub enum OriginTrialTokenStatus {
312 #[serde(rename = "Success")]
313 Success,
314 #[serde(rename = "NotSupported")]
315 NotSupported,
316 #[serde(rename = "Insecure")]
317 Insecure,
318 #[serde(rename = "Expired")]
319 Expired,
320 #[serde(rename = "WrongOrigin")]
321 WrongOrigin,
322 #[serde(rename = "InvalidSignature")]
323 InvalidSignature,
324 #[serde(rename = "Malformed")]
325 Malformed,
326 #[serde(rename = "WrongVersion")]
327 WrongVersion,
328 #[serde(rename = "FeatureDisabled")]
329 FeatureDisabled,
330 #[serde(rename = "TokenDisabled")]
331 TokenDisabled,
332 #[serde(rename = "FeatureDisabledForUser")]
333 FeatureDisabledForUser,
334 #[serde(rename = "UnknownTrial")]
335 UnknownTrial,
336}
337#[allow(deprecated)]
338#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
339pub enum OriginTrialStatus {
340 #[serde(rename = "Enabled")]
341 Enabled,
342 #[serde(rename = "ValidTokenNotProvided")]
343 ValidTokenNotProvided,
344 #[serde(rename = "OSNotSupported")]
345 OsNotSupported,
346 #[serde(rename = "TrialNotAllowed")]
347 TrialNotAllowed,
348}
349#[allow(deprecated)]
350#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
351pub enum OriginTrialUsageRestriction {
352 #[serde(rename = "None")]
353 None,
354 #[serde(rename = "Subset")]
355 Subset,
356}
357#[allow(deprecated)]
358#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
359pub enum TransitionType {
360 #[serde(rename = "link")]
361 Link,
362 #[serde(rename = "typed")]
363 Typed,
364 #[serde(rename = "address_bar")]
365 AddressBar,
366 #[serde(rename = "auto_bookmark")]
367 AutoBookmark,
368 #[serde(rename = "auto_subframe")]
369 AutoSubframe,
370 #[serde(rename = "manual_subframe")]
371 ManualSubframe,
372 #[serde(rename = "generated")]
373 Generated,
374 #[serde(rename = "auto_toplevel")]
375 AutoToplevel,
376 #[serde(rename = "form_submit")]
377 FormSubmit,
378 #[serde(rename = "reload")]
379 Reload,
380 #[serde(rename = "keyword")]
381 Keyword,
382 #[serde(rename = "keyword_generated")]
383 KeywordGenerated,
384 #[serde(rename = "other")]
385 Other,
386}
387#[allow(deprecated)]
388#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
389pub enum DialogType {
390 #[serde(rename = "alert")]
391 Alert,
392 #[serde(rename = "confirm")]
393 Confirm,
394 #[serde(rename = "prompt")]
395 Prompt,
396 #[serde(rename = "beforeunload")]
397 Beforeunload,
398}
399#[allow(deprecated)]
400#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
401pub enum ClientNavigationReason {
402 #[serde(rename = "anchorClick")]
403 AnchorClick,
404 #[serde(rename = "formSubmissionGet")]
405 FormSubmissionGet,
406 #[serde(rename = "formSubmissionPost")]
407 FormSubmissionPost,
408 #[serde(rename = "httpHeaderRefresh")]
409 HttpHeaderRefresh,
410 #[serde(rename = "initialFrameNavigation")]
411 InitialFrameNavigation,
412 #[serde(rename = "metaTagRefresh")]
413 MetaTagRefresh,
414 #[serde(rename = "other")]
415 Other,
416 #[serde(rename = "pageBlockInterstitial")]
417 PageBlockInterstitial,
418 #[serde(rename = "reload")]
419 Reload,
420 #[serde(rename = "scriptInitiated")]
421 ScriptInitiated,
422}
423#[allow(deprecated)]
424#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
425pub enum ClientNavigationDisposition {
426 #[serde(rename = "currentTab")]
427 CurrentTab,
428 #[serde(rename = "newTab")]
429 NewTab,
430 #[serde(rename = "newWindow")]
431 NewWindow,
432 #[serde(rename = "download")]
433 Download,
434}
435#[allow(deprecated)]
436#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
437pub enum ReferrerPolicy {
438 #[serde(rename = "noReferrer")]
439 NoReferrer,
440 #[serde(rename = "noReferrerWhenDowngrade")]
441 NoReferrerWhenDowngrade,
442 #[serde(rename = "origin")]
443 Origin,
444 #[serde(rename = "originWhenCrossOrigin")]
445 OriginWhenCrossOrigin,
446 #[serde(rename = "sameOrigin")]
447 SameOrigin,
448 #[serde(rename = "strictOrigin")]
449 StrictOrigin,
450 #[serde(rename = "strictOriginWhenCrossOrigin")]
451 StrictOriginWhenCrossOrigin,
452 #[serde(rename = "unsafeUrl")]
453 UnsafeUrl,
454}
455#[allow(deprecated)]
456#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
457pub enum NavigationType {
458 #[serde(rename = "Navigation")]
459 Navigation,
460 #[serde(rename = "BackForwardCacheRestore")]
461 BackForwardCacheRestore,
462}
463#[allow(deprecated)]
464#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
465pub enum BackForwardCacheNotRestoredReason {
466 #[serde(rename = "NotPrimaryMainFrame")]
467 NotPrimaryMainFrame,
468 #[serde(rename = "BackForwardCacheDisabled")]
469 BackForwardCacheDisabled,
470 #[serde(rename = "RelatedActiveContentsExist")]
471 RelatedActiveContentsExist,
472 #[serde(rename = "HTTPStatusNotOK")]
473 HttpStatusNotOk,
474 #[serde(rename = "SchemeNotHTTPOrHTTPS")]
475 SchemeNotHttpOrHttps,
476 #[serde(rename = "Loading")]
477 Loading,
478 #[serde(rename = "WasGrantedMediaAccess")]
479 WasGrantedMediaAccess,
480 #[serde(rename = "DisableForRenderFrameHostCalled")]
481 DisableForRenderFrameHostCalled,
482 #[serde(rename = "DomainNotAllowed")]
483 DomainNotAllowed,
484 #[serde(rename = "HTTPMethodNotGET")]
485 HttpMethodNotGet,
486 #[serde(rename = "SubframeIsNavigating")]
487 SubframeIsNavigating,
488 #[serde(rename = "Timeout")]
489 Timeout,
490 #[serde(rename = "CacheLimit")]
491 CacheLimit,
492 #[serde(rename = "JavaScriptExecution")]
493 JavaScriptExecution,
494 #[serde(rename = "RendererProcessKilled")]
495 RendererProcessKilled,
496 #[serde(rename = "RendererProcessCrashed")]
497 RendererProcessCrashed,
498 #[serde(rename = "SchedulerTrackedFeatureUsed")]
499 SchedulerTrackedFeatureUsed,
500 #[serde(rename = "ConflictingBrowsingInstance")]
501 ConflictingBrowsingInstance,
502 #[serde(rename = "CacheFlushed")]
503 CacheFlushed,
504 #[serde(rename = "ServiceWorkerVersionActivation")]
505 ServiceWorkerVersionActivation,
506 #[serde(rename = "SessionRestored")]
507 SessionRestored,
508 #[serde(rename = "ServiceWorkerPostMessage")]
509 ServiceWorkerPostMessage,
510 #[serde(rename = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded")]
511 EnteredBackForwardCacheBeforeServiceWorkerHostAdded,
512 #[serde(rename = "RenderFrameHostReused_SameSite")]
513 RenderFrameHostReusedSameSite,
514 #[serde(rename = "RenderFrameHostReused_CrossSite")]
515 RenderFrameHostReusedCrossSite,
516 #[serde(rename = "ServiceWorkerClaim")]
517 ServiceWorkerClaim,
518 #[serde(rename = "IgnoreEventAndEvict")]
519 IgnoreEventAndEvict,
520 #[serde(rename = "HaveInnerContents")]
521 HaveInnerContents,
522 #[serde(rename = "TimeoutPuttingInCache")]
523 TimeoutPuttingInCache,
524 #[serde(rename = "BackForwardCacheDisabledByLowMemory")]
525 BackForwardCacheDisabledByLowMemory,
526 #[serde(rename = "BackForwardCacheDisabledByCommandLine")]
527 BackForwardCacheDisabledByCommandLine,
528 #[serde(rename = "NetworkRequestDatapipeDrainedAsBytesConsumer")]
529 NetworkRequestDatapipeDrainedAsBytesConsumer,
530 #[serde(rename = "NetworkRequestRedirected")]
531 NetworkRequestRedirected,
532 #[serde(rename = "NetworkRequestTimeout")]
533 NetworkRequestTimeout,
534 #[serde(rename = "NetworkExceedsBufferLimit")]
535 NetworkExceedsBufferLimit,
536 #[serde(rename = "NavigationCancelledWhileRestoring")]
537 NavigationCancelledWhileRestoring,
538 #[serde(rename = "NotMostRecentNavigationEntry")]
539 NotMostRecentNavigationEntry,
540 #[serde(rename = "BackForwardCacheDisabledForPrerender")]
541 BackForwardCacheDisabledForPrerender,
542 #[serde(rename = "UserAgentOverrideDiffers")]
543 UserAgentOverrideDiffers,
544 #[serde(rename = "ForegroundCacheLimit")]
545 ForegroundCacheLimit,
546 #[serde(rename = "BrowsingInstanceNotSwapped")]
547 BrowsingInstanceNotSwapped,
548 #[serde(rename = "BackForwardCacheDisabledForDelegate")]
549 BackForwardCacheDisabledForDelegate,
550 #[serde(rename = "UnloadHandlerExistsInMainFrame")]
551 UnloadHandlerExistsInMainFrame,
552 #[serde(rename = "UnloadHandlerExistsInSubFrame")]
553 UnloadHandlerExistsInSubFrame,
554 #[serde(rename = "ServiceWorkerUnregistration")]
555 ServiceWorkerUnregistration,
556 #[serde(rename = "CacheControlNoStore")]
557 CacheControlNoStore,
558 #[serde(rename = "CacheControlNoStoreCookieModified")]
559 CacheControlNoStoreCookieModified,
560 #[serde(rename = "CacheControlNoStoreHTTPOnlyCookieModified")]
561 CacheControlNoStoreHttpOnlyCookieModified,
562 #[serde(rename = "NoResponseHead")]
563 NoResponseHead,
564 #[serde(rename = "Unknown")]
565 Unknown,
566 #[serde(rename = "ActivationNavigationsDisallowedForBug1234857")]
567 ActivationNavigationsDisallowedForBug1234857,
568 #[serde(rename = "ErrorDocument")]
569 ErrorDocument,
570 #[serde(rename = "FencedFramesEmbedder")]
571 FencedFramesEmbedder,
572 #[serde(rename = "CookieDisabled")]
573 CookieDisabled,
574 #[serde(rename = "HTTPAuthRequired")]
575 HttpAuthRequired,
576 #[serde(rename = "CookieFlushed")]
577 CookieFlushed,
578 #[serde(rename = "BroadcastChannelOnMessage")]
579 BroadcastChannelOnMessage,
580 #[serde(rename = "WebViewSettingsChanged")]
581 WebViewSettingsChanged,
582 #[serde(rename = "WebViewJavaScriptObjectChanged")]
583 WebViewJavaScriptObjectChanged,
584 #[serde(rename = "WebViewMessageListenerInjected")]
585 WebViewMessageListenerInjected,
586 #[serde(rename = "WebViewSafeBrowsingAllowlistChanged")]
587 WebViewSafeBrowsingAllowlistChanged,
588 #[serde(rename = "WebViewDocumentStartJavascriptChanged")]
589 WebViewDocumentStartJavascriptChanged,
590 #[serde(rename = "WebSocket")]
591 WebSocket,
592 #[serde(rename = "WebTransport")]
593 WebTransport,
594 #[serde(rename = "WebRTC")]
595 WebRtc,
596 #[serde(rename = "MainResourceHasCacheControlNoStore")]
597 MainResourceHasCacheControlNoStore,
598 #[serde(rename = "MainResourceHasCacheControlNoCache")]
599 MainResourceHasCacheControlNoCache,
600 #[serde(rename = "SubresourceHasCacheControlNoStore")]
601 SubresourceHasCacheControlNoStore,
602 #[serde(rename = "SubresourceHasCacheControlNoCache")]
603 SubresourceHasCacheControlNoCache,
604 #[serde(rename = "ContainsPlugins")]
605 ContainsPlugins,
606 #[serde(rename = "DocumentLoaded")]
607 DocumentLoaded,
608 #[serde(rename = "OutstandingNetworkRequestOthers")]
609 OutstandingNetworkRequestOthers,
610 #[serde(rename = "RequestedMIDIPermission")]
611 RequestedMidiPermission,
612 #[serde(rename = "RequestedAudioCapturePermission")]
613 RequestedAudioCapturePermission,
614 #[serde(rename = "RequestedVideoCapturePermission")]
615 RequestedVideoCapturePermission,
616 #[serde(rename = "RequestedBackForwardCacheBlockedSensors")]
617 RequestedBackForwardCacheBlockedSensors,
618 #[serde(rename = "RequestedBackgroundWorkPermission")]
619 RequestedBackgroundWorkPermission,
620 #[serde(rename = "BroadcastChannel")]
621 BroadcastChannel,
622 #[serde(rename = "WebXR")]
623 WebXr,
624 #[serde(rename = "SharedWorker")]
625 SharedWorker,
626 #[serde(rename = "SharedWorkerMessage")]
627 SharedWorkerMessage,
628 #[serde(rename = "SharedWorkerWithNoActiveClient")]
629 SharedWorkerWithNoActiveClient,
630 #[serde(rename = "WebLocks")]
631 WebLocks,
632 #[serde(rename = "WebLocksContention")]
633 WebLocksContention,
634 #[serde(rename = "WebHID")]
635 WebHid,
636 #[serde(rename = "WebBluetooth")]
637 WebBluetooth,
638 #[serde(rename = "WebShare")]
639 WebShare,
640 #[serde(rename = "RequestedStorageAccessGrant")]
641 RequestedStorageAccessGrant,
642 #[serde(rename = "WebNfc")]
643 WebNfc,
644 #[serde(rename = "OutstandingNetworkRequestFetch")]
645 OutstandingNetworkRequestFetch,
646 #[serde(rename = "OutstandingNetworkRequestXHR")]
647 OutstandingNetworkRequestXhr,
648 #[serde(rename = "AppBanner")]
649 AppBanner,
650 #[serde(rename = "Printing")]
651 Printing,
652 #[serde(rename = "WebDatabase")]
653 WebDatabase,
654 #[serde(rename = "PictureInPicture")]
655 PictureInPicture,
656 #[serde(rename = "SpeechRecognizer")]
657 SpeechRecognizer,
658 #[serde(rename = "IdleManager")]
659 IdleManager,
660 #[serde(rename = "PaymentManager")]
661 PaymentManager,
662 #[serde(rename = "SpeechSynthesis")]
663 SpeechSynthesis,
664 #[serde(rename = "KeyboardLock")]
665 KeyboardLock,
666 #[serde(rename = "WebOTPService")]
667 WebOtpService,
668 #[serde(rename = "OutstandingNetworkRequestDirectSocket")]
669 OutstandingNetworkRequestDirectSocket,
670 #[serde(rename = "InjectedJavascript")]
671 InjectedJavascript,
672 #[serde(rename = "InjectedStyleSheet")]
673 InjectedStyleSheet,
674 #[serde(rename = "KeepaliveRequest")]
675 KeepaliveRequest,
676 #[serde(rename = "IndexedDBEvent")]
677 IndexedDbEvent,
678 #[serde(rename = "Dummy")]
679 Dummy,
680 #[serde(rename = "JsNetworkRequestReceivedCacheControlNoStoreResource")]
681 JsNetworkRequestReceivedCacheControlNoStoreResource,
682 #[serde(rename = "WebRTCUsedWithCCNS")]
683 WebRtcUsedWithCcns,
684 #[serde(rename = "WebTransportUsedWithCCNS")]
685 WebTransportUsedWithCcns,
686 #[serde(rename = "WebSocketUsedWithCCNS")]
687 WebSocketUsedWithCcns,
688 #[serde(rename = "SmartCard")]
689 SmartCard,
690 #[serde(rename = "LiveMediaStreamTrack")]
691 LiveMediaStreamTrack,
692 #[serde(rename = "UnloadHandler")]
693 UnloadHandler,
694 #[serde(rename = "ParserAborted")]
695 ParserAborted,
696 #[serde(rename = "ContentSecurityHandler")]
697 ContentSecurityHandler,
698 #[serde(rename = "ContentWebAuthenticationAPI")]
699 ContentWebAuthenticationApi,
700 #[serde(rename = "ContentFileChooser")]
701 ContentFileChooser,
702 #[serde(rename = "ContentSerial")]
703 ContentSerial,
704 #[serde(rename = "ContentFileSystemAccess")]
705 ContentFileSystemAccess,
706 #[serde(rename = "ContentMediaDevicesDispatcherHost")]
707 ContentMediaDevicesDispatcherHost,
708 #[serde(rename = "ContentWebBluetooth")]
709 ContentWebBluetooth,
710 #[serde(rename = "ContentWebUSB")]
711 ContentWebUsb,
712 #[serde(rename = "ContentMediaSessionService")]
713 ContentMediaSessionService,
714 #[serde(rename = "ContentScreenReader")]
715 ContentScreenReader,
716 #[serde(rename = "ContentDiscarded")]
717 ContentDiscarded,
718 #[serde(rename = "EmbedderPopupBlockerTabHelper")]
719 EmbedderPopupBlockerTabHelper,
720 #[serde(rename = "EmbedderSafeBrowsingTriggeredPopupBlocker")]
721 EmbedderSafeBrowsingTriggeredPopupBlocker,
722 #[serde(rename = "EmbedderSafeBrowsingThreatDetails")]
723 EmbedderSafeBrowsingThreatDetails,
724 #[serde(rename = "EmbedderAppBannerManager")]
725 EmbedderAppBannerManager,
726 #[serde(rename = "EmbedderDomDistillerViewerSource")]
727 EmbedderDomDistillerViewerSource,
728 #[serde(rename = "EmbedderDomDistillerSelfDeletingRequestDelegate")]
729 EmbedderDomDistillerSelfDeletingRequestDelegate,
730 #[serde(rename = "EmbedderOomInterventionTabHelper")]
731 EmbedderOomInterventionTabHelper,
732 #[serde(rename = "EmbedderOfflinePage")]
733 EmbedderOfflinePage,
734 #[serde(rename = "EmbedderChromePasswordManagerClientBindCredentialManager")]
735 EmbedderChromePasswordManagerClientBindCredentialManager,
736 #[serde(rename = "EmbedderPermissionRequestManager")]
737 EmbedderPermissionRequestManager,
738 #[serde(rename = "EmbedderModalDialog")]
739 EmbedderModalDialog,
740 #[serde(rename = "EmbedderExtensions")]
741 EmbedderExtensions,
742 #[serde(rename = "EmbedderExtensionMessaging")]
743 EmbedderExtensionMessaging,
744 #[serde(rename = "EmbedderExtensionMessagingForOpenPort")]
745 EmbedderExtensionMessagingForOpenPort,
746 #[serde(rename = "EmbedderExtensionSentMessageToCachedFrame")]
747 EmbedderExtensionSentMessageToCachedFrame,
748 #[serde(rename = "RequestedByWebViewClient")]
749 RequestedByWebViewClient,
750 #[serde(rename = "PostMessageByWebViewClient")]
751 PostMessageByWebViewClient,
752 #[serde(rename = "CacheControlNoStoreDeviceBoundSessionTerminated")]
753 CacheControlNoStoreDeviceBoundSessionTerminated,
754 #[serde(rename = "CacheLimitPrunedOnModerateMemoryPressure")]
755 CacheLimitPrunedOnModerateMemoryPressure,
756 #[serde(rename = "CacheLimitPrunedOnCriticalMemoryPressure")]
757 CacheLimitPrunedOnCriticalMemoryPressure,
758}
759#[allow(deprecated)]
760#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
761pub enum BackForwardCacheNotRestoredReasonType {
762 #[serde(rename = "SupportPending")]
763 SupportPending,
764 #[serde(rename = "PageSupportNeeded")]
765 PageSupportNeeded,
766 #[serde(rename = "Circumstantial")]
767 Circumstantial,
768}
769#[allow(deprecated)]
770#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
771pub enum CaptureScreenshotFormatOption {
772 #[serde(rename = "jpeg")]
773 Jpeg,
774 #[serde(rename = "png")]
775 Png,
776 #[serde(rename = "webp")]
777 Webp,
778}
779#[allow(deprecated)]
780#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
781pub enum CaptureSnapshotFormatOption {
782 #[serde(rename = "mhtml")]
783 Mhtml,
784}
785#[allow(deprecated)]
786#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
787pub enum PrintToPdfTransferModeOption {
788 #[serde(rename = "ReturnAsBase64")]
789 ReturnAsBase64,
790 #[serde(rename = "ReturnAsStream")]
791 ReturnAsStream,
792}
793#[allow(deprecated)]
794#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
795pub enum SetDownloadBehaviorBehaviorOption {
796 #[serde(rename = "deny")]
797 Deny,
798 #[serde(rename = "allow")]
799 Allow,
800 #[serde(rename = "default")]
801 Default,
802}
803#[allow(deprecated)]
804#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
805pub enum SetTouchEmulationEnabledConfigurationOption {
806 #[serde(rename = "mobile")]
807 Mobile,
808 #[serde(rename = "desktop")]
809 Desktop,
810}
811#[allow(deprecated)]
812#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
813pub enum StartScreencastFormatOption {
814 #[serde(rename = "jpeg")]
815 Jpeg,
816 #[serde(rename = "png")]
817 Png,
818}
819#[allow(deprecated)]
820#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
821pub enum SetWebLifecycleStateStateOption {
822 #[serde(rename = "frozen")]
823 Frozen,
824 #[serde(rename = "active")]
825 Active,
826}
827#[allow(deprecated)]
828#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
829pub enum SetSpcTransactionModeModeOption {
830 #[serde(rename = "none")]
831 None,
832 #[serde(rename = "autoAccept")]
833 AutoAccept,
834 #[serde(rename = "autoChooseToAuthAnotherWay")]
835 AutoChooseToAuthAnotherWay,
836 #[serde(rename = "autoReject")]
837 AutoReject,
838 #[serde(rename = "autoOptOut")]
839 AutoOptOut,
840}
841#[allow(deprecated)]
842#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
843pub enum SetRphRegistrationModeModeOption {
844 #[serde(rename = "none")]
845 None,
846 #[serde(rename = "autoAccept")]
847 AutoAccept,
848 #[serde(rename = "autoReject")]
849 AutoReject,
850}
851#[allow(deprecated)]
852#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
853pub enum FileChooserOpenedModeOption {
854 #[serde(rename = "selectSingle")]
855 SelectSingle,
856 #[serde(rename = "selectMultiple")]
857 SelectMultiple,
858}
859#[allow(deprecated)]
860#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
861pub enum FrameDetachedReasonOption {
862 #[serde(rename = "remove")]
863 Remove,
864 #[serde(rename = "swap")]
865 Swap,
866}
867#[allow(deprecated)]
868#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
869pub enum FrameStartedNavigatingNavigationTypeOption {
870 #[serde(rename = "reload")]
871 Reload,
872 #[serde(rename = "reloadBypassingCache")]
873 ReloadBypassingCache,
874 #[serde(rename = "restore")]
875 Restore,
876 #[serde(rename = "restoreWithPost")]
877 RestoreWithPost,
878 #[serde(rename = "historySameDocument")]
879 HistorySameDocument,
880 #[serde(rename = "historyDifferentDocument")]
881 HistoryDifferentDocument,
882 #[serde(rename = "sameDocument")]
883 SameDocument,
884 #[serde(rename = "differentDocument")]
885 DifferentDocument,
886}
887#[allow(deprecated)]
888#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
889pub enum DownloadProgressStateOption {
890 #[serde(rename = "inProgress")]
891 InProgress,
892 #[serde(rename = "completed")]
893 Completed,
894 #[serde(rename = "canceled")]
895 Canceled,
896}
897#[allow(deprecated)]
898#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
899pub enum NavigatedWithinDocumentNavigationTypeOption {
900 #[serde(rename = "fragment")]
901 Fragment,
902 #[serde(rename = "historyApi")]
903 HistoryApi,
904 #[serde(rename = "other")]
905 Other,
906}
907#[allow(deprecated)]
908#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
909#[builder(setter(into, strip_option))]
910#[serde(rename_all = "camelCase")]
911#[doc = "Indicates whether a frame has been identified as an ad and why."]
912pub struct AdFrameStatus {
913 pub ad_frame_type: AdFrameType,
914 #[builder(default)]
915 #[serde(skip_serializing_if = "Option::is_none")]
916 pub explanations: Option<Vec<AdFrameExplanation>>,
917}
918#[allow(deprecated)]
919#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
920#[builder(setter(into, strip_option))]
921#[serde(rename_all = "camelCase")]
922#[doc = "Identifies the script which caused a script or frame to be labelled as an\n ad."]
923pub struct AdScriptId {
924 #[doc = "Script Id of the script which caused a script or frame to be labelled as\n an ad."]
925 pub script_id: runtime::ScriptId,
926 #[doc = "Id of scriptId's debugger."]
927 pub debugger_id: runtime::UniqueDebuggerId,
928}
929#[allow(deprecated)]
930#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
931#[builder(setter(into, strip_option))]
932#[serde(rename_all = "camelCase")]
933#[doc = "Encapsulates the script ancestry and the root script filterlist rule that\n caused the frame to be labelled as an ad. Only created when `ancestryChain`\n is not empty."]
934pub struct AdScriptAncestry {
935 #[doc = "A chain of `AdScriptId`s representing the ancestry of an ad script that\n led to the creation of a frame. The chain is ordered from the script\n itself (lower level) up to its root ancestor that was flagged by\n filterlist."]
936 pub ancestry_chain: Vec<AdScriptId>,
937 #[builder(default)]
938 #[serde(skip_serializing_if = "Option::is_none")]
939 #[serde(default)]
940 #[doc = "The filterlist rule that caused the root (last) script in\n `ancestryChain` to be ad-tagged. Only populated if the rule is\n available."]
941 pub root_script_filterlist_rule: Option<String>,
942}
943#[allow(deprecated)]
944#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
945#[builder(setter(into, strip_option))]
946#[serde(rename_all = "camelCase")]
947pub struct PermissionsPolicyBlockLocator {
948 pub frame_id: FrameId,
949 pub block_reason: PermissionsPolicyBlockReason,
950}
951#[allow(deprecated)]
952#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
953#[builder(setter(into, strip_option))]
954#[serde(rename_all = "camelCase")]
955pub struct PermissionsPolicyFeatureState {
956 pub feature: PermissionsPolicyFeature,
957 #[serde(default)]
958 pub allowed: bool,
959 #[builder(default)]
960 #[serde(skip_serializing_if = "Option::is_none")]
961 pub locator: Option<PermissionsPolicyBlockLocator>,
962}
963#[allow(deprecated)]
964#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
965#[builder(setter(into, strip_option))]
966#[serde(rename_all = "camelCase")]
967pub struct OriginTrialToken {
968 #[serde(default)]
969 pub origin: String,
970 #[serde(default)]
971 pub match_sub_domains: bool,
972 #[serde(default)]
973 pub trial_name: String,
974 pub expiry_time: network::TimeSinceEpoch,
975 #[serde(default)]
976 pub is_third_party: bool,
977 pub usage_restriction: OriginTrialUsageRestriction,
978}
979#[allow(deprecated)]
980#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
981#[builder(setter(into, strip_option))]
982#[serde(rename_all = "camelCase")]
983pub struct OriginTrialTokenWithStatus {
984 #[serde(default)]
985 pub raw_token_text: String,
986 #[builder(default)]
987 #[serde(skip_serializing_if = "Option::is_none")]
988 #[doc = "`parsedToken` is present only when the token is extractable and\n parsable."]
989 pub parsed_token: Option<OriginTrialToken>,
990 pub status: OriginTrialTokenStatus,
991}
992#[allow(deprecated)]
993#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
994#[builder(setter(into, strip_option))]
995#[serde(rename_all = "camelCase")]
996pub struct OriginTrial {
997 #[serde(default)]
998 pub trial_name: String,
999 pub status: OriginTrialStatus,
1000 pub tokens_with_status: Vec<OriginTrialTokenWithStatus>,
1001}
1002#[allow(deprecated)]
1003#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1004#[builder(setter(into, strip_option))]
1005#[serde(rename_all = "camelCase")]
1006#[doc = "Additional information about the frame document's security origin."]
1007pub struct SecurityOriginDetails {
1008 #[serde(default)]
1009 #[doc = "Indicates whether the frame document's security origin is one\n of the local hostnames (e.g. \"localhost\") or IP addresses (IPv4\n 127.0.0.0/8 or IPv6 ::1)."]
1010 pub is_localhost: bool,
1011}
1012#[allow(deprecated)]
1013#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1014#[builder(setter(into, strip_option))]
1015#[serde(rename_all = "camelCase")]
1016#[doc = "Information about the Frame on the page."]
1017pub struct Frame {
1018 #[doc = "Frame unique identifier."]
1019 pub id: FrameId,
1020 #[builder(default)]
1021 #[serde(skip_serializing_if = "Option::is_none")]
1022 #[doc = "Parent frame identifier."]
1023 pub parent_id: Option<FrameId>,
1024 #[doc = "Identifier of the loader associated with this frame."]
1025 pub loader_id: network::LoaderId,
1026 #[builder(default)]
1027 #[serde(skip_serializing_if = "Option::is_none")]
1028 #[serde(default)]
1029 #[doc = "Frame's name as specified in the tag."]
1030 pub name: Option<String>,
1031 #[serde(default)]
1032 #[doc = "Frame document's URL without fragment."]
1033 pub url: String,
1034 #[builder(default)]
1035 #[serde(skip_serializing_if = "Option::is_none")]
1036 #[serde(default)]
1037 #[doc = "Frame document's URL fragment including the '#'."]
1038 pub url_fragment: Option<String>,
1039 #[serde(default)]
1040 #[doc = "Frame document's registered domain, taking the public suffixes list into account.\n Extracted from the Frame's url.\n Example URLs: <http://www.google.com/file.html> -\\> \"google.com\"\n <http://a.b.co.uk/file.html> -\\> \"b.co.uk\""]
1041 pub domain_and_registry: String,
1042 #[serde(default)]
1043 #[doc = "Frame document's security origin."]
1044 pub security_origin: String,
1045 #[builder(default)]
1046 #[serde(skip_serializing_if = "Option::is_none")]
1047 #[doc = "Additional details about the frame document's security origin."]
1048 pub security_origin_details: Option<SecurityOriginDetails>,
1049 #[serde(default)]
1050 #[doc = "Frame document's mimeType as determined by the browser."]
1051 pub mime_type: String,
1052 #[builder(default)]
1053 #[serde(skip_serializing_if = "Option::is_none")]
1054 #[serde(default)]
1055 #[doc = "If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment."]
1056 pub unreachable_url: Option<String>,
1057 #[builder(default)]
1058 #[serde(skip_serializing_if = "Option::is_none")]
1059 #[doc = "Indicates whether this frame was tagged as an ad and why."]
1060 pub ad_frame_status: Option<AdFrameStatus>,
1061 #[doc = "Indicates whether the main document is a secure context and explains why that is the case."]
1062 pub secure_context_type: SecureContextType,
1063 #[doc = "Indicates whether this is a cross origin isolated context."]
1064 pub cross_origin_isolated_context_type: CrossOriginIsolatedContextType,
1065 #[doc = "Indicated which gated APIs / features are available."]
1066 #[serde(rename = "gatedAPIFeatures")]
1067 pub gated_api_features: Vec<GatedApiFeatures>,
1068}
1069#[allow(deprecated)]
1070#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1071#[builder(setter(into, strip_option))]
1072#[serde(rename_all = "camelCase")]
1073#[doc = "Information about the Resource on the page."]
1074pub struct FrameResource {
1075 #[serde(default)]
1076 #[doc = "Resource URL."]
1077 pub url: String,
1078 #[doc = "Type of this resource."]
1079 pub r#type: network::ResourceType,
1080 #[serde(default)]
1081 #[doc = "Resource mimeType as determined by the browser."]
1082 pub mime_type: String,
1083 #[builder(default)]
1084 #[serde(skip_serializing_if = "Option::is_none")]
1085 #[doc = "last-modified timestamp as reported by server."]
1086 pub last_modified: Option<network::TimeSinceEpoch>,
1087 #[builder(default)]
1088 #[serde(skip_serializing_if = "Option::is_none")]
1089 #[serde(default)]
1090 #[doc = "Resource content size."]
1091 pub content_size: Option<JsFloat>,
1092 #[builder(default)]
1093 #[serde(skip_serializing_if = "Option::is_none")]
1094 #[serde(default)]
1095 #[doc = "True if the resource failed to load."]
1096 pub failed: Option<bool>,
1097 #[builder(default)]
1098 #[serde(skip_serializing_if = "Option::is_none")]
1099 #[serde(default)]
1100 #[doc = "True if the resource was canceled during loading."]
1101 pub canceled: Option<bool>,
1102}
1103#[allow(deprecated)]
1104#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1105#[builder(setter(into, strip_option))]
1106#[serde(rename_all = "camelCase")]
1107#[doc = "Information about the Frame hierarchy along with their cached resources."]
1108pub struct FrameResourceTree {
1109 #[doc = "Frame information for this tree item."]
1110 pub frame: Frame,
1111 #[builder(default)]
1112 #[serde(skip_serializing_if = "Option::is_none")]
1113 #[doc = "Child frames."]
1114 pub child_frames: Option<Vec<FrameResourceTree>>,
1115 #[doc = "Information about frame resources."]
1116 pub resources: Vec<FrameResource>,
1117}
1118#[allow(deprecated)]
1119#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1120#[builder(setter(into, strip_option))]
1121#[serde(rename_all = "camelCase")]
1122#[doc = "Information about the Frame hierarchy."]
1123pub struct FrameTree {
1124 #[doc = "Frame information for this tree item."]
1125 pub frame: Frame,
1126 #[builder(default)]
1127 #[serde(skip_serializing_if = "Option::is_none")]
1128 #[doc = "Child frames."]
1129 pub child_frames: Option<Vec<FrameTree>>,
1130}
1131#[allow(deprecated)]
1132#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1133#[builder(setter(into, strip_option))]
1134#[serde(rename_all = "camelCase")]
1135#[doc = "Navigation history entry."]
1136pub struct NavigationEntry {
1137 #[serde(default)]
1138 #[doc = "Unique id of the navigation history entry."]
1139 pub id: JsUInt,
1140 #[serde(default)]
1141 #[doc = "URL of the navigation history entry."]
1142 pub url: String,
1143 #[serde(default)]
1144 #[doc = "URL that the user typed in the url bar."]
1145 #[serde(rename = "userTypedURL")]
1146 pub user_typed_url: String,
1147 #[serde(default)]
1148 #[doc = "Title of the navigation history entry."]
1149 pub title: String,
1150 #[doc = "Transition type."]
1151 pub transition_type: TransitionType,
1152}
1153#[allow(deprecated)]
1154#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1155#[builder(setter(into, strip_option))]
1156#[serde(rename_all = "camelCase")]
1157#[doc = "Screencast frame metadata."]
1158pub struct ScreencastFrameMetadata {
1159 #[serde(default)]
1160 #[doc = "Top offset in DIP."]
1161 pub offset_top: JsFloat,
1162 #[serde(default)]
1163 #[doc = "Page scale factor."]
1164 pub page_scale_factor: JsFloat,
1165 #[serde(default)]
1166 #[doc = "Device screen width in DIP."]
1167 pub device_width: JsFloat,
1168 #[serde(default)]
1169 #[doc = "Device screen height in DIP."]
1170 pub device_height: JsFloat,
1171 #[serde(default)]
1172 #[doc = "Position of horizontal scroll in CSS pixels."]
1173 pub scroll_offset_x: JsFloat,
1174 #[serde(default)]
1175 #[doc = "Position of vertical scroll in CSS pixels."]
1176 pub scroll_offset_y: JsFloat,
1177 #[builder(default)]
1178 #[serde(skip_serializing_if = "Option::is_none")]
1179 #[doc = "Frame swap timestamp."]
1180 pub timestamp: Option<network::TimeSinceEpoch>,
1181}
1182#[allow(deprecated)]
1183#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1184#[builder(setter(into, strip_option))]
1185#[serde(rename_all = "camelCase")]
1186#[doc = "Error while paring app manifest."]
1187pub struct AppManifestError {
1188 #[serde(default)]
1189 #[doc = "Error message."]
1190 pub message: String,
1191 #[serde(default)]
1192 #[doc = "If critical, this is a non-recoverable parse error."]
1193 pub critical: JsUInt,
1194 #[serde(default)]
1195 #[doc = "Error line."]
1196 pub line: JsUInt,
1197 #[serde(default)]
1198 #[doc = "Error column."]
1199 pub column: JsUInt,
1200}
1201#[allow(deprecated)]
1202#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1203#[builder(setter(into, strip_option))]
1204#[serde(rename_all = "camelCase")]
1205#[doc = "Parsed app manifest properties."]
1206pub struct AppManifestParsedProperties {
1207 #[serde(default)]
1208 #[doc = "Computed scope value"]
1209 pub scope: String,
1210}
1211#[allow(deprecated)]
1212#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1213#[builder(setter(into, strip_option))]
1214#[serde(rename_all = "camelCase")]
1215#[doc = "Layout viewport position and dimensions."]
1216pub struct LayoutViewport {
1217 #[serde(default)]
1218 #[doc = "Horizontal offset relative to the document (CSS pixels)."]
1219 pub page_x: JsUInt,
1220 #[serde(default)]
1221 #[doc = "Vertical offset relative to the document (CSS pixels)."]
1222 pub page_y: JsUInt,
1223 #[serde(default)]
1224 #[doc = "Width (CSS pixels), excludes scrollbar if present."]
1225 pub client_width: JsUInt,
1226 #[serde(default)]
1227 #[doc = "Height (CSS pixels), excludes scrollbar if present."]
1228 pub client_height: JsUInt,
1229}
1230#[allow(deprecated)]
1231#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1232#[builder(setter(into, strip_option))]
1233#[serde(rename_all = "camelCase")]
1234#[doc = "Visual viewport position, dimensions, and scale."]
1235pub struct VisualViewport {
1236 #[serde(default)]
1237 #[doc = "Horizontal offset relative to the layout viewport (CSS pixels)."]
1238 pub offset_x: JsFloat,
1239 #[serde(default)]
1240 #[doc = "Vertical offset relative to the layout viewport (CSS pixels)."]
1241 pub offset_y: JsFloat,
1242 #[serde(default)]
1243 #[doc = "Horizontal offset relative to the document (CSS pixels)."]
1244 pub page_x: JsFloat,
1245 #[serde(default)]
1246 #[doc = "Vertical offset relative to the document (CSS pixels)."]
1247 pub page_y: JsFloat,
1248 #[serde(default)]
1249 #[doc = "Width (CSS pixels), excludes scrollbar if present."]
1250 pub client_width: JsFloat,
1251 #[serde(default)]
1252 #[doc = "Height (CSS pixels), excludes scrollbar if present."]
1253 pub client_height: JsFloat,
1254 #[serde(default)]
1255 #[doc = "Scale relative to the ideal viewport (size at width=device-width)."]
1256 pub scale: JsFloat,
1257 #[builder(default)]
1258 #[serde(skip_serializing_if = "Option::is_none")]
1259 #[serde(default)]
1260 #[doc = "Page zoom factor (CSS to device independent pixels ratio)."]
1261 pub zoom: Option<JsFloat>,
1262}
1263#[allow(deprecated)]
1264#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1265#[builder(setter(into, strip_option))]
1266#[serde(rename_all = "camelCase")]
1267#[doc = "Viewport for capturing screenshot."]
1268pub struct Viewport {
1269 #[serde(default)]
1270 #[doc = "X offset in device independent pixels (dip)."]
1271 pub x: JsFloat,
1272 #[serde(default)]
1273 #[doc = "Y offset in device independent pixels (dip)."]
1274 pub y: JsFloat,
1275 #[serde(default)]
1276 #[doc = "Rectangle width in device independent pixels (dip)."]
1277 pub width: JsFloat,
1278 #[serde(default)]
1279 #[doc = "Rectangle height in device independent pixels (dip)."]
1280 pub height: JsFloat,
1281 #[serde(default)]
1282 #[doc = "Page scale factor."]
1283 pub scale: JsFloat,
1284}
1285#[allow(deprecated)]
1286#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1287#[builder(setter(into, strip_option))]
1288#[serde(rename_all = "camelCase")]
1289#[doc = "Generic font families collection."]
1290pub struct FontFamilies {
1291 #[builder(default)]
1292 #[serde(skip_serializing_if = "Option::is_none")]
1293 #[serde(default)]
1294 #[doc = "The standard font-family."]
1295 pub standard: Option<String>,
1296 #[builder(default)]
1297 #[serde(skip_serializing_if = "Option::is_none")]
1298 #[serde(default)]
1299 #[doc = "The fixed font-family."]
1300 pub fixed: Option<String>,
1301 #[builder(default)]
1302 #[serde(skip_serializing_if = "Option::is_none")]
1303 #[serde(default)]
1304 #[doc = "The serif font-family."]
1305 pub serif: Option<String>,
1306 #[builder(default)]
1307 #[serde(skip_serializing_if = "Option::is_none")]
1308 #[serde(default)]
1309 #[doc = "The sansSerif font-family."]
1310 pub sans_serif: Option<String>,
1311 #[builder(default)]
1312 #[serde(skip_serializing_if = "Option::is_none")]
1313 #[serde(default)]
1314 #[doc = "The cursive font-family."]
1315 pub cursive: Option<String>,
1316 #[builder(default)]
1317 #[serde(skip_serializing_if = "Option::is_none")]
1318 #[serde(default)]
1319 #[doc = "The fantasy font-family."]
1320 pub fantasy: Option<String>,
1321 #[builder(default)]
1322 #[serde(skip_serializing_if = "Option::is_none")]
1323 #[serde(default)]
1324 #[doc = "The math font-family."]
1325 pub math: Option<String>,
1326}
1327#[allow(deprecated)]
1328#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1329#[builder(setter(into, strip_option))]
1330#[serde(rename_all = "camelCase")]
1331#[doc = "Font families collection for a script."]
1332pub struct ScriptFontFamilies {
1333 #[serde(default)]
1334 #[doc = "Name of the script which these font families are defined for."]
1335 pub script: String,
1336 #[doc = "Generic font families collection for the script."]
1337 pub font_families: FontFamilies,
1338}
1339#[allow(deprecated)]
1340#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1341#[builder(setter(into, strip_option))]
1342#[serde(rename_all = "camelCase")]
1343#[doc = "Default font sizes."]
1344pub struct FontSizes {
1345 #[builder(default)]
1346 #[serde(skip_serializing_if = "Option::is_none")]
1347 #[serde(default)]
1348 #[doc = "Default standard font size."]
1349 pub standard: Option<JsUInt>,
1350 #[builder(default)]
1351 #[serde(skip_serializing_if = "Option::is_none")]
1352 #[serde(default)]
1353 #[doc = "Default fixed font size."]
1354 pub fixed: Option<JsUInt>,
1355}
1356#[allow(deprecated)]
1357#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1358#[builder(setter(into, strip_option))]
1359#[serde(rename_all = "camelCase")]
1360pub struct InstallabilityErrorArgument {
1361 #[serde(default)]
1362 #[doc = "Argument name (e.g. name:'minimum-icon-size-in-pixels')."]
1363 pub name: String,
1364 #[serde(default)]
1365 #[doc = "Argument value (e.g. value:'64')."]
1366 pub value: String,
1367}
1368#[allow(deprecated)]
1369#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1370#[builder(setter(into, strip_option))]
1371#[serde(rename_all = "camelCase")]
1372#[doc = "The installability error"]
1373pub struct InstallabilityError {
1374 #[serde(default)]
1375 #[doc = "The error id (e.g. 'manifest-missing-suitable-icon')."]
1376 pub error_id: String,
1377 #[doc = "The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'})."]
1378 pub error_arguments: Vec<InstallabilityErrorArgument>,
1379}
1380#[allow(deprecated)]
1381#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1382#[builder(setter(into, strip_option))]
1383#[serde(rename_all = "camelCase")]
1384#[doc = "Per-script compilation cache parameters for `Page.produceCompilationCache`"]
1385pub struct CompilationCacheParams {
1386 #[serde(default)]
1387 #[doc = "The URL of the script to produce a compilation cache entry for."]
1388 pub url: String,
1389 #[builder(default)]
1390 #[serde(skip_serializing_if = "Option::is_none")]
1391 #[serde(default)]
1392 #[doc = "A hint to the backend whether eager compilation is recommended.\n (the actual compilation mode used is upon backend discretion)."]
1393 pub eager: Option<bool>,
1394}
1395#[allow(deprecated)]
1396#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1397#[builder(setter(into, strip_option))]
1398#[serde(rename_all = "camelCase")]
1399pub struct FileFilter {
1400 #[builder(default)]
1401 #[serde(skip_serializing_if = "Option::is_none")]
1402 #[serde(default)]
1403 pub name: Option<String>,
1404 #[builder(default)]
1405 #[serde(skip_serializing_if = "Option::is_none")]
1406 #[serde(default)]
1407 pub accepts: Option<Vec<String>>,
1408}
1409#[allow(deprecated)]
1410#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1411#[builder(setter(into, strip_option))]
1412#[serde(rename_all = "camelCase")]
1413pub struct FileHandler {
1414 #[serde(default)]
1415 pub action: String,
1416 #[serde(default)]
1417 pub name: String,
1418 #[builder(default)]
1419 #[serde(skip_serializing_if = "Option::is_none")]
1420 pub icons: Option<Vec<ImageResource>>,
1421 #[builder(default)]
1422 #[serde(skip_serializing_if = "Option::is_none")]
1423 #[doc = "Mimic a map, name is the key, accepts is the value."]
1424 pub accepts: Option<Vec<FileFilter>>,
1425 #[serde(default)]
1426 #[doc = "Won't repeat the enums, using string for easy comparison. Same as the\n other enums below."]
1427 pub launch_type: String,
1428}
1429#[allow(deprecated)]
1430#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1431#[builder(setter(into, strip_option))]
1432#[serde(rename_all = "camelCase")]
1433#[doc = "The image definition used in both icon and screenshot."]
1434pub struct ImageResource {
1435 #[serde(default)]
1436 #[doc = "The src field in the definition, but changing to url in favor of\n consistency."]
1437 pub url: String,
1438 #[builder(default)]
1439 #[serde(skip_serializing_if = "Option::is_none")]
1440 #[serde(default)]
1441 pub sizes: Option<String>,
1442 #[builder(default)]
1443 #[serde(skip_serializing_if = "Option::is_none")]
1444 #[serde(default)]
1445 pub r#type: Option<String>,
1446}
1447#[allow(deprecated)]
1448#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1449#[builder(setter(into, strip_option))]
1450#[serde(rename_all = "camelCase")]
1451pub struct LaunchHandler {
1452 #[serde(default)]
1453 pub client_mode: String,
1454}
1455#[allow(deprecated)]
1456#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1457#[builder(setter(into, strip_option))]
1458#[serde(rename_all = "camelCase")]
1459pub struct ProtocolHandler {
1460 #[serde(default)]
1461 pub protocol: String,
1462 #[serde(default)]
1463 pub url: String,
1464}
1465#[allow(deprecated)]
1466#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1467#[builder(setter(into, strip_option))]
1468#[serde(rename_all = "camelCase")]
1469pub struct RelatedApplication {
1470 #[builder(default)]
1471 #[serde(skip_serializing_if = "Option::is_none")]
1472 #[serde(default)]
1473 pub id: Option<String>,
1474 #[serde(default)]
1475 pub url: String,
1476}
1477#[allow(deprecated)]
1478#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1479#[builder(setter(into, strip_option))]
1480#[serde(rename_all = "camelCase")]
1481pub struct ScopeExtension {
1482 #[serde(default)]
1483 #[doc = "Instead of using tuple, this field always returns the serialized string\n for easy understanding and comparison."]
1484 pub origin: String,
1485 #[serde(default)]
1486 pub has_origin_wildcard: bool,
1487}
1488#[allow(deprecated)]
1489#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1490#[builder(setter(into, strip_option))]
1491#[serde(rename_all = "camelCase")]
1492pub struct Screenshot {
1493 pub image: ImageResource,
1494 #[serde(default)]
1495 pub form_factor: String,
1496 #[builder(default)]
1497 #[serde(skip_serializing_if = "Option::is_none")]
1498 #[serde(default)]
1499 pub label: Option<String>,
1500}
1501#[allow(deprecated)]
1502#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1503#[builder(setter(into, strip_option))]
1504#[serde(rename_all = "camelCase")]
1505pub struct ShareTarget {
1506 #[serde(default)]
1507 pub action: String,
1508 #[serde(default)]
1509 pub method: String,
1510 #[serde(default)]
1511 pub enctype: String,
1512 #[builder(default)]
1513 #[serde(skip_serializing_if = "Option::is_none")]
1514 #[serde(default)]
1515 #[doc = "Embed the ShareTargetParams"]
1516 pub title: Option<String>,
1517 #[builder(default)]
1518 #[serde(skip_serializing_if = "Option::is_none")]
1519 #[serde(default)]
1520 pub text: Option<String>,
1521 #[builder(default)]
1522 #[serde(skip_serializing_if = "Option::is_none")]
1523 #[serde(default)]
1524 pub url: Option<String>,
1525 #[builder(default)]
1526 #[serde(skip_serializing_if = "Option::is_none")]
1527 pub files: Option<Vec<FileFilter>>,
1528}
1529#[allow(deprecated)]
1530#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1531#[builder(setter(into, strip_option))]
1532#[serde(rename_all = "camelCase")]
1533pub struct Shortcut {
1534 #[serde(default)]
1535 pub name: String,
1536 #[serde(default)]
1537 pub url: String,
1538}
1539#[allow(deprecated)]
1540#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1541#[builder(setter(into, strip_option))]
1542#[serde(rename_all = "camelCase")]
1543pub struct WebAppManifest {
1544 #[builder(default)]
1545 #[serde(skip_serializing_if = "Option::is_none")]
1546 #[serde(default)]
1547 pub background_color: Option<String>,
1548 #[builder(default)]
1549 #[serde(skip_serializing_if = "Option::is_none")]
1550 #[serde(default)]
1551 #[doc = "The extra description provided by the manifest."]
1552 pub description: Option<String>,
1553 #[builder(default)]
1554 #[serde(skip_serializing_if = "Option::is_none")]
1555 #[serde(default)]
1556 pub dir: Option<String>,
1557 #[builder(default)]
1558 #[serde(skip_serializing_if = "Option::is_none")]
1559 #[serde(default)]
1560 pub display: Option<String>,
1561 #[builder(default)]
1562 #[serde(skip_serializing_if = "Option::is_none")]
1563 #[serde(default)]
1564 #[doc = "The overrided display mode controlled by the user."]
1565 pub display_overrides: Option<Vec<String>>,
1566 #[builder(default)]
1567 #[serde(skip_serializing_if = "Option::is_none")]
1568 #[doc = "The handlers to open files."]
1569 pub file_handlers: Option<Vec<FileHandler>>,
1570 #[builder(default)]
1571 #[serde(skip_serializing_if = "Option::is_none")]
1572 pub icons: Option<Vec<ImageResource>>,
1573 #[builder(default)]
1574 #[serde(skip_serializing_if = "Option::is_none")]
1575 #[serde(default)]
1576 pub id: Option<String>,
1577 #[builder(default)]
1578 #[serde(skip_serializing_if = "Option::is_none")]
1579 #[serde(default)]
1580 pub lang: Option<String>,
1581 #[builder(default)]
1582 #[serde(skip_serializing_if = "Option::is_none")]
1583 #[doc = "TODO(crbug.com/1231886): This field is non-standard and part of a Chrome\n experiment. See:\n <https://github.com/WICG/web-app-launch/blob/main/launch_handler.md>"]
1584 pub launch_handler: Option<LaunchHandler>,
1585 #[builder(default)]
1586 #[serde(skip_serializing_if = "Option::is_none")]
1587 #[serde(default)]
1588 pub name: Option<String>,
1589 #[builder(default)]
1590 #[serde(skip_serializing_if = "Option::is_none")]
1591 #[serde(default)]
1592 pub orientation: Option<String>,
1593 #[builder(default)]
1594 #[serde(skip_serializing_if = "Option::is_none")]
1595 #[serde(default)]
1596 pub prefer_related_applications: Option<bool>,
1597 #[builder(default)]
1598 #[serde(skip_serializing_if = "Option::is_none")]
1599 #[doc = "The handlers to open protocols."]
1600 pub protocol_handlers: Option<Vec<ProtocolHandler>>,
1601 #[builder(default)]
1602 #[serde(skip_serializing_if = "Option::is_none")]
1603 pub related_applications: Option<Vec<RelatedApplication>>,
1604 #[builder(default)]
1605 #[serde(skip_serializing_if = "Option::is_none")]
1606 #[serde(default)]
1607 pub scope: Option<String>,
1608 #[builder(default)]
1609 #[serde(skip_serializing_if = "Option::is_none")]
1610 #[doc = "Non-standard, see\n <https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md>"]
1611 pub scope_extensions: Option<Vec<ScopeExtension>>,
1612 #[builder(default)]
1613 #[serde(skip_serializing_if = "Option::is_none")]
1614 #[doc = "The screenshots used by chromium."]
1615 pub screenshots: Option<Vec<Screenshot>>,
1616 #[builder(default)]
1617 #[serde(skip_serializing_if = "Option::is_none")]
1618 pub share_target: Option<ShareTarget>,
1619 #[builder(default)]
1620 #[serde(skip_serializing_if = "Option::is_none")]
1621 #[serde(default)]
1622 pub short_name: Option<String>,
1623 #[builder(default)]
1624 #[serde(skip_serializing_if = "Option::is_none")]
1625 pub shortcuts: Option<Vec<Shortcut>>,
1626 #[builder(default)]
1627 #[serde(skip_serializing_if = "Option::is_none")]
1628 #[serde(default)]
1629 pub start_url: Option<String>,
1630 #[builder(default)]
1631 #[serde(skip_serializing_if = "Option::is_none")]
1632 #[serde(default)]
1633 pub theme_color: Option<String>,
1634}
1635#[allow(deprecated)]
1636#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1637#[builder(setter(into, strip_option))]
1638#[serde(rename_all = "camelCase")]
1639pub struct BackForwardCacheBlockingDetails {
1640 #[builder(default)]
1641 #[serde(skip_serializing_if = "Option::is_none")]
1642 #[serde(default)]
1643 #[doc = "Url of the file where blockage happened. Optional because of tests."]
1644 pub url: Option<String>,
1645 #[builder(default)]
1646 #[serde(skip_serializing_if = "Option::is_none")]
1647 #[serde(default)]
1648 #[doc = "Function name where blockage happened. Optional because of anonymous functions and tests."]
1649 pub function: Option<String>,
1650 #[serde(default)]
1651 #[doc = "Line number in the script (0-based)."]
1652 pub line_number: JsUInt,
1653 #[serde(default)]
1654 #[doc = "Column number in the script (0-based)."]
1655 pub column_number: JsUInt,
1656}
1657#[allow(deprecated)]
1658#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1659#[builder(setter(into, strip_option))]
1660#[serde(rename_all = "camelCase")]
1661pub struct BackForwardCacheNotRestoredExplanation {
1662 #[doc = "Type of the reason"]
1663 pub r#type: BackForwardCacheNotRestoredReasonType,
1664 #[doc = "Not restored reason"]
1665 pub reason: BackForwardCacheNotRestoredReason,
1666 #[builder(default)]
1667 #[serde(skip_serializing_if = "Option::is_none")]
1668 #[serde(default)]
1669 #[doc = "Context associated with the reason. The meaning of this context is\n dependent on the reason:\n - EmbedderExtensionSentMessageToCachedFrame: the extension ID."]
1670 pub context: Option<String>,
1671 #[builder(default)]
1672 #[serde(skip_serializing_if = "Option::is_none")]
1673 pub details: Option<Vec<BackForwardCacheBlockingDetails>>,
1674}
1675#[allow(deprecated)]
1676#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1677#[builder(setter(into, strip_option))]
1678#[serde(rename_all = "camelCase")]
1679pub struct BackForwardCacheNotRestoredExplanationTree {
1680 #[serde(default)]
1681 #[doc = "URL of each frame"]
1682 pub url: String,
1683 #[doc = "Not restored reasons of each frame"]
1684 pub explanations: Vec<BackForwardCacheNotRestoredExplanation>,
1685 #[doc = "Array of children frame"]
1686 pub children: Vec<BackForwardCacheNotRestoredExplanationTree>,
1687}
1688#[allow(deprecated)]
1689#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1690#[builder(setter(into, strip_option))]
1691#[serde(rename_all = "camelCase")]
1692#[doc = "Deprecated, please use addScriptToEvaluateOnNewDocument instead."]
1693#[deprecated]
1694pub struct AddScriptToEvaluateOnLoad {
1695 #[serde(default)]
1696 pub script_source: String,
1697}
1698#[allow(deprecated)]
1699#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1700#[builder(setter(into, strip_option))]
1701#[serde(rename_all = "camelCase")]
1702#[doc = "Evaluates given script in every frame upon creation (before loading frame's scripts)."]
1703pub struct AddScriptToEvaluateOnNewDocument {
1704 #[serde(default)]
1705 pub source: String,
1706 #[builder(default)]
1707 #[serde(skip_serializing_if = "Option::is_none")]
1708 #[serde(default)]
1709 #[doc = "If specified, creates an isolated world with the given name and evaluates given script in it.\n This world name will be used as the ExecutionContextDescription::name when the corresponding\n event is emitted."]
1710 pub world_name: Option<String>,
1711 #[builder(default)]
1712 #[serde(skip_serializing_if = "Option::is_none")]
1713 #[serde(default)]
1714 #[doc = "Specifies whether command line API should be available to the script, defaults\n to false."]
1715 #[serde(rename = "includeCommandLineAPI")]
1716 pub include_command_line_api: Option<bool>,
1717 #[builder(default)]
1718 #[serde(skip_serializing_if = "Option::is_none")]
1719 #[serde(default)]
1720 #[doc = "If true, runs the script immediately on existing execution contexts or worlds.\n Default: false."]
1721 pub run_immediately: Option<bool>,
1722}
1723#[allow(deprecated)]
1724#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1725pub struct BringToFront(pub Option<Json>);
1726#[allow(deprecated)]
1727#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1728#[builder(setter(into, strip_option))]
1729#[serde(rename_all = "camelCase")]
1730#[doc = "Capture page screenshot."]
1731pub struct CaptureScreenshot {
1732 #[builder(default)]
1733 #[serde(skip_serializing_if = "Option::is_none")]
1734 #[doc = "Image compression format (defaults to png)."]
1735 pub format: Option<CaptureScreenshotFormatOption>,
1736 #[builder(default)]
1737 #[serde(skip_serializing_if = "Option::is_none")]
1738 #[serde(default)]
1739 #[doc = "Compression quality from range \\[0..100\\] (jpeg only)."]
1740 pub quality: Option<JsUInt>,
1741 #[builder(default)]
1742 #[serde(skip_serializing_if = "Option::is_none")]
1743 #[doc = "Capture the screenshot of a given region only."]
1744 pub clip: Option<Viewport>,
1745 #[builder(default)]
1746 #[serde(skip_serializing_if = "Option::is_none")]
1747 #[serde(default)]
1748 #[doc = "Capture the screenshot from the surface, rather than the view. Defaults to true."]
1749 pub from_surface: Option<bool>,
1750 #[builder(default)]
1751 #[serde(skip_serializing_if = "Option::is_none")]
1752 #[serde(default)]
1753 #[doc = "Capture the screenshot beyond the viewport. Defaults to false."]
1754 pub capture_beyond_viewport: Option<bool>,
1755 #[builder(default)]
1756 #[serde(skip_serializing_if = "Option::is_none")]
1757 #[serde(default)]
1758 #[doc = "Optimize image encoding for speed, not for resulting size (defaults to false)"]
1759 pub optimize_for_speed: Option<bool>,
1760}
1761#[allow(deprecated)]
1762#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1763#[builder(setter(into, strip_option))]
1764#[serde(rename_all = "camelCase")]
1765#[doc = "Returns a snapshot of the page as a string. For MHTML format, the serialization includes\n iframes, shadow DOM, external resources, and element-inline styles."]
1766pub struct CaptureSnapshot {
1767 #[builder(default)]
1768 #[serde(skip_serializing_if = "Option::is_none")]
1769 #[doc = "Format (defaults to mhtml)."]
1770 pub format: Option<CaptureSnapshotFormatOption>,
1771}
1772#[allow(deprecated)]
1773#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1774pub struct ClearDeviceMetricsOverride(pub Option<Json>);
1775#[allow(deprecated)]
1776#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1777pub struct ClearDeviceOrientationOverride(pub Option<Json>);
1778#[allow(deprecated)]
1779#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1780pub struct ClearGeolocationOverride(pub Option<Json>);
1781#[allow(deprecated)]
1782#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1783#[builder(setter(into, strip_option))]
1784#[serde(rename_all = "camelCase")]
1785#[doc = "Creates an isolated world for the given frame."]
1786pub struct CreateIsolatedWorld {
1787 #[doc = "Id of the frame in which the isolated world should be created."]
1788 pub frame_id: FrameId,
1789 #[builder(default)]
1790 #[serde(skip_serializing_if = "Option::is_none")]
1791 #[serde(default)]
1792 #[doc = "An optional name which is reported in the Execution Context."]
1793 pub world_name: Option<String>,
1794 #[builder(default)]
1795 #[serde(skip_serializing_if = "Option::is_none")]
1796 #[serde(default)]
1797 #[doc = "Whether or not universal access should be granted to the isolated world. This is a powerful\n option, use with caution."]
1798 pub grant_univeral_access: Option<bool>,
1799}
1800#[allow(deprecated)]
1801#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1802#[builder(setter(into, strip_option))]
1803#[serde(rename_all = "camelCase")]
1804#[doc = "Deletes browser cookie with given name, domain and path."]
1805#[deprecated]
1806pub struct DeleteCookie {
1807 #[serde(default)]
1808 #[doc = "Name of the cookie to remove."]
1809 pub cookie_name: String,
1810 #[serde(default)]
1811 #[doc = "URL to match cooke domain and path."]
1812 pub url: String,
1813}
1814#[allow(deprecated)]
1815#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1816pub struct Disable(pub Option<Json>);
1817#[allow(deprecated)]
1818#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1819#[builder(setter(into, strip_option))]
1820#[serde(rename_all = "camelCase")]
1821#[doc = "Enables page domain notifications."]
1822pub struct Enable {
1823 #[builder(default)]
1824 #[serde(skip_serializing_if = "Option::is_none")]
1825 #[serde(default)]
1826 #[doc = "If true, the `Page.fileChooserOpened` event will be emitted regardless of the state set by\n `Page.setInterceptFileChooserDialog` command (default: false)."]
1827 pub enable_file_chooser_opened_event: Option<bool>,
1828}
1829#[allow(deprecated)]
1830#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1831#[builder(setter(into, strip_option))]
1832#[serde(rename_all = "camelCase")]
1833#[doc = "Gets the processed manifest for this current document.\n This API always waits for the manifest to be loaded.\n If manifestId is provided, and it does not match the manifest of the\n current document, this API errors out.\n If there is not a loaded page, this API errors out immediately."]
1834pub struct GetAppManifest {
1835 #[builder(default)]
1836 #[serde(skip_serializing_if = "Option::is_none")]
1837 #[serde(default)]
1838 pub manifest_id: Option<String>,
1839}
1840#[allow(deprecated)]
1841#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1842pub struct GetInstallabilityErrors(pub Option<Json>);
1843#[allow(deprecated)]
1844#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1845pub struct GetManifestIcons(pub Option<Json>);
1846#[allow(deprecated)]
1847#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1848pub struct GetAppId(pub Option<Json>);
1849#[allow(deprecated)]
1850#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1851#[builder(setter(into, strip_option))]
1852#[serde(rename_all = "camelCase")]
1853pub struct GetAdScriptAncestry {
1854 pub frame_id: FrameId,
1855}
1856#[allow(deprecated)]
1857#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1858pub struct GetFrameTree(pub Option<Json>);
1859#[allow(deprecated)]
1860#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1861pub struct GetLayoutMetrics(pub Option<Json>);
1862#[allow(deprecated)]
1863#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1864pub struct GetNavigationHistory(pub Option<Json>);
1865#[allow(deprecated)]
1866#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1867pub struct ResetNavigationHistory(pub Option<Json>);
1868#[allow(deprecated)]
1869#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1870#[builder(setter(into, strip_option))]
1871#[serde(rename_all = "camelCase")]
1872#[doc = "Returns content of the given resource."]
1873pub struct GetResourceContent {
1874 #[doc = "Frame id to get resource for."]
1875 pub frame_id: FrameId,
1876 #[serde(default)]
1877 #[doc = "URL of the resource to get content for."]
1878 pub url: String,
1879}
1880#[allow(deprecated)]
1881#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1882pub struct GetResourceTree(pub Option<Json>);
1883#[allow(deprecated)]
1884#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1885#[builder(setter(into, strip_option))]
1886#[serde(rename_all = "camelCase")]
1887#[doc = "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload)."]
1888pub struct HandleJavaScriptDialog {
1889 #[serde(default)]
1890 #[doc = "Whether to accept or dismiss the dialog."]
1891 pub accept: bool,
1892 #[builder(default)]
1893 #[serde(skip_serializing_if = "Option::is_none")]
1894 #[serde(default)]
1895 #[doc = "The text to enter into the dialog prompt before accepting. Used only if this is a prompt\n dialog."]
1896 pub prompt_text: Option<String>,
1897}
1898#[allow(deprecated)]
1899#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1900#[builder(setter(into, strip_option))]
1901#[serde(rename_all = "camelCase")]
1902#[doc = "Navigates current page to the given URL."]
1903pub struct Navigate {
1904 #[serde(default)]
1905 #[doc = "URL to navigate the page to."]
1906 pub url: String,
1907 #[builder(default)]
1908 #[serde(skip_serializing_if = "Option::is_none")]
1909 #[serde(default)]
1910 #[doc = "Referrer URL."]
1911 pub referrer: Option<String>,
1912 #[builder(default)]
1913 #[serde(skip_serializing_if = "Option::is_none")]
1914 #[doc = "Intended transition type."]
1915 pub transition_type: Option<TransitionType>,
1916 #[builder(default)]
1917 #[serde(skip_serializing_if = "Option::is_none")]
1918 #[doc = "Frame id to navigate, if not specified navigates the top frame."]
1919 pub frame_id: Option<FrameId>,
1920 #[builder(default)]
1921 #[serde(skip_serializing_if = "Option::is_none")]
1922 #[doc = "Referrer-policy used for the navigation."]
1923 pub referrer_policy: Option<ReferrerPolicy>,
1924}
1925#[allow(deprecated)]
1926#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1927#[builder(setter(into, strip_option))]
1928#[serde(rename_all = "camelCase")]
1929#[doc = "Navigates current page to the given history entry."]
1930pub struct NavigateToHistoryEntry {
1931 #[serde(default)]
1932 #[doc = "Unique id of the entry to navigate to."]
1933 pub entry_id: JsUInt,
1934}
1935#[allow(deprecated)]
1936#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1937#[builder(setter(into, strip_option))]
1938#[serde(rename_all = "camelCase")]
1939#[doc = "Print page as PDF."]
1940pub struct PrintToPDF {
1941 #[builder(default)]
1942 #[serde(skip_serializing_if = "Option::is_none")]
1943 #[serde(default)]
1944 #[doc = "Paper orientation. Defaults to false."]
1945 pub landscape: Option<bool>,
1946 #[builder(default)]
1947 #[serde(skip_serializing_if = "Option::is_none")]
1948 #[serde(default)]
1949 #[doc = "Display header and footer. Defaults to false."]
1950 pub display_header_footer: Option<bool>,
1951 #[builder(default)]
1952 #[serde(skip_serializing_if = "Option::is_none")]
1953 #[serde(default)]
1954 #[doc = "Print background graphics. Defaults to false."]
1955 pub print_background: Option<bool>,
1956 #[builder(default)]
1957 #[serde(skip_serializing_if = "Option::is_none")]
1958 #[serde(default)]
1959 #[doc = "Scale of the webpage rendering. Defaults to 1."]
1960 pub scale: Option<JsFloat>,
1961 #[builder(default)]
1962 #[serde(skip_serializing_if = "Option::is_none")]
1963 #[serde(default)]
1964 #[doc = "Paper width in inches. Defaults to 8.5 inches."]
1965 pub paper_width: Option<JsFloat>,
1966 #[builder(default)]
1967 #[serde(skip_serializing_if = "Option::is_none")]
1968 #[serde(default)]
1969 #[doc = "Paper height in inches. Defaults to 11 inches."]
1970 pub paper_height: Option<JsFloat>,
1971 #[builder(default)]
1972 #[serde(skip_serializing_if = "Option::is_none")]
1973 #[serde(default)]
1974 #[doc = "Top margin in inches. Defaults to 1cm (~0.4 inches)."]
1975 pub margin_top: Option<JsFloat>,
1976 #[builder(default)]
1977 #[serde(skip_serializing_if = "Option::is_none")]
1978 #[serde(default)]
1979 #[doc = "Bottom margin in inches. Defaults to 1cm (~0.4 inches)."]
1980 pub margin_bottom: Option<JsFloat>,
1981 #[builder(default)]
1982 #[serde(skip_serializing_if = "Option::is_none")]
1983 #[serde(default)]
1984 #[doc = "Left margin in inches. Defaults to 1cm (~0.4 inches)."]
1985 pub margin_left: Option<JsFloat>,
1986 #[builder(default)]
1987 #[serde(skip_serializing_if = "Option::is_none")]
1988 #[serde(default)]
1989 #[doc = "Right margin in inches. Defaults to 1cm (~0.4 inches)."]
1990 pub margin_right: Option<JsFloat>,
1991 #[builder(default)]
1992 #[serde(skip_serializing_if = "Option::is_none")]
1993 #[serde(default)]
1994 #[doc = "Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are\n printed in the document order, not in the order specified, and no\n more than once.\n Defaults to empty string, which implies the entire document is printed.\n The page numbers are quietly capped to actual page count of the\n document, and ranges beyond the end of the document are ignored.\n If this results in no pages to print, an error is reported.\n It is an error to specify a range with start greater than end."]
1995 pub page_ranges: Option<String>,
1996 #[builder(default)]
1997 #[serde(skip_serializing_if = "Option::is_none")]
1998 #[serde(default)]
1999 #[doc = "HTML template for the print header. Should be valid HTML markup with following\n classes used to inject printing values into them:\n - `date`: formatted print date\n - `title`: document title\n - `url`: document location\n - `pageNumber`: current page number\n - `totalPages`: total pages in the document\n \n For example, `\\<span class=title\\>\\</span\\>` would generate span containing the title."]
2000 pub header_template: Option<String>,
2001 #[builder(default)]
2002 #[serde(skip_serializing_if = "Option::is_none")]
2003 #[serde(default)]
2004 #[doc = "HTML template for the print footer. Should use the same format as the `headerTemplate`."]
2005 pub footer_template: Option<String>,
2006 #[builder(default)]
2007 #[serde(skip_serializing_if = "Option::is_none")]
2008 #[serde(default)]
2009 #[doc = "Whether or not to prefer page size as defined by css. Defaults to false,\n in which case the content will be scaled to fit the paper size."]
2010 #[serde(rename = "preferCSSPageSize")]
2011 pub prefer_css_page_size: Option<bool>,
2012 #[builder(default)]
2013 #[serde(skip_serializing_if = "Option::is_none")]
2014 #[doc = "return as stream"]
2015 pub transfer_mode: Option<PrintToPdfTransferModeOption>,
2016 #[builder(default)]
2017 #[serde(skip_serializing_if = "Option::is_none")]
2018 #[serde(default)]
2019 #[doc = "Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice."]
2020 #[serde(rename = "generateTaggedPDF")]
2021 pub generate_tagged_pdf: Option<bool>,
2022 #[builder(default)]
2023 #[serde(skip_serializing_if = "Option::is_none")]
2024 #[serde(default)]
2025 #[doc = "Whether or not to embed the document outline into the PDF."]
2026 pub generate_document_outline: Option<bool>,
2027}
2028#[allow(deprecated)]
2029#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2030#[builder(setter(into, strip_option))]
2031#[serde(rename_all = "camelCase")]
2032#[doc = "Reloads given page optionally ignoring the cache."]
2033pub struct Reload {
2034 #[builder(default)]
2035 #[serde(skip_serializing_if = "Option::is_none")]
2036 #[serde(default)]
2037 #[doc = "If true, browser cache is ignored (as if the user pressed Shift+refresh)."]
2038 pub ignore_cache: Option<bool>,
2039 #[builder(default)]
2040 #[serde(skip_serializing_if = "Option::is_none")]
2041 #[serde(default)]
2042 #[doc = "If set, the script will be injected into all frames of the inspected page after reload.\n Argument will be ignored if reloading dataURL origin."]
2043 pub script_to_evaluate_on_load: Option<String>,
2044 #[builder(default)]
2045 #[serde(skip_serializing_if = "Option::is_none")]
2046 #[doc = "If set, an error will be thrown if the target page's main frame's\n loader id does not match the provided id. This prevents accidentally\n reloading an unintended target in case there's a racing navigation."]
2047 pub loader_id: Option<network::LoaderId>,
2048}
2049#[allow(deprecated)]
2050#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2051#[builder(setter(into, strip_option))]
2052#[serde(rename_all = "camelCase")]
2053#[doc = "Deprecated, please use removeScriptToEvaluateOnNewDocument instead."]
2054#[deprecated]
2055pub struct RemoveScriptToEvaluateOnLoad {
2056 pub identifier: ScriptIdentifier,
2057}
2058#[allow(deprecated)]
2059#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2060#[builder(setter(into, strip_option))]
2061#[serde(rename_all = "camelCase")]
2062#[doc = "Removes given script from the list."]
2063pub struct RemoveScriptToEvaluateOnNewDocument {
2064 pub identifier: ScriptIdentifier,
2065}
2066#[allow(deprecated)]
2067#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2068#[builder(setter(into, strip_option))]
2069#[serde(rename_all = "camelCase")]
2070#[doc = "Acknowledges that a screencast frame has been received by the frontend."]
2071pub struct ScreencastFrameAck {
2072 #[serde(default)]
2073 #[doc = "Frame number."]
2074 pub session_id: JsUInt,
2075}
2076#[allow(deprecated)]
2077#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2078#[builder(setter(into, strip_option))]
2079#[serde(rename_all = "camelCase")]
2080#[doc = "Searches for given string in resource content."]
2081pub struct SearchInResource {
2082 #[doc = "Frame id for resource to search in."]
2083 pub frame_id: FrameId,
2084 #[serde(default)]
2085 #[doc = "URL of the resource to search in."]
2086 pub url: String,
2087 #[serde(default)]
2088 #[doc = "String to search for."]
2089 pub query: String,
2090 #[builder(default)]
2091 #[serde(skip_serializing_if = "Option::is_none")]
2092 #[serde(default)]
2093 #[doc = "If true, search is case sensitive."]
2094 pub case_sensitive: Option<bool>,
2095 #[builder(default)]
2096 #[serde(skip_serializing_if = "Option::is_none")]
2097 #[serde(default)]
2098 #[doc = "If true, treats string parameter as regex."]
2099 pub is_regex: Option<bool>,
2100}
2101#[allow(deprecated)]
2102#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2103#[builder(setter(into, strip_option))]
2104#[serde(rename_all = "camelCase")]
2105#[doc = "Enable Chrome's experimental ad filter on all sites."]
2106pub struct SetAdBlockingEnabled {
2107 #[serde(default)]
2108 #[doc = "Whether to block ads."]
2109 pub enabled: bool,
2110}
2111#[allow(deprecated)]
2112#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2113#[builder(setter(into, strip_option))]
2114#[serde(rename_all = "camelCase")]
2115#[doc = "Enable page Content Security Policy by-passing."]
2116pub struct SetBypassCSP {
2117 #[serde(default)]
2118 #[doc = "Whether to bypass page CSP."]
2119 pub enabled: bool,
2120}
2121#[allow(deprecated)]
2122#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2123#[builder(setter(into, strip_option))]
2124#[serde(rename_all = "camelCase")]
2125#[doc = "Get Permissions Policy state on given frame."]
2126pub struct GetPermissionsPolicyState {
2127 pub frame_id: FrameId,
2128}
2129#[allow(deprecated)]
2130#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2131#[builder(setter(into, strip_option))]
2132#[serde(rename_all = "camelCase")]
2133#[doc = "Get Origin Trials on given frame."]
2134pub struct GetOriginTrials {
2135 pub frame_id: FrameId,
2136}
2137#[allow(deprecated)]
2138#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2139#[builder(setter(into, strip_option))]
2140#[serde(rename_all = "camelCase")]
2141#[doc = "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\n window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\n query results)."]
2142#[deprecated]
2143pub struct SetDeviceMetricsOverride {
2144 #[serde(default)]
2145 #[doc = "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override."]
2146 pub width: JsUInt,
2147 #[serde(default)]
2148 #[doc = "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override."]
2149 pub height: JsUInt,
2150 #[serde(default)]
2151 #[doc = "Overriding device scale factor value. 0 disables the override."]
2152 pub device_scale_factor: JsFloat,
2153 #[serde(default)]
2154 #[doc = "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text\n autosizing and more."]
2155 pub mobile: bool,
2156 #[builder(default)]
2157 #[serde(skip_serializing_if = "Option::is_none")]
2158 #[serde(default)]
2159 #[doc = "Scale to apply to resulting view image."]
2160 pub scale: Option<JsFloat>,
2161 #[builder(default)]
2162 #[serde(skip_serializing_if = "Option::is_none")]
2163 #[serde(default)]
2164 #[doc = "Overriding screen width value in pixels (minimum 0, maximum 10000000)."]
2165 pub screen_width: Option<JsUInt>,
2166 #[builder(default)]
2167 #[serde(skip_serializing_if = "Option::is_none")]
2168 #[serde(default)]
2169 #[doc = "Overriding screen height value in pixels (minimum 0, maximum 10000000)."]
2170 pub screen_height: Option<JsUInt>,
2171 #[builder(default)]
2172 #[serde(skip_serializing_if = "Option::is_none")]
2173 #[serde(default)]
2174 #[doc = "Overriding view X position on screen in pixels (minimum 0, maximum 10000000)."]
2175 pub position_x: Option<JsUInt>,
2176 #[builder(default)]
2177 #[serde(skip_serializing_if = "Option::is_none")]
2178 #[serde(default)]
2179 #[doc = "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000)."]
2180 pub position_y: Option<JsUInt>,
2181 #[builder(default)]
2182 #[serde(skip_serializing_if = "Option::is_none")]
2183 #[serde(default)]
2184 #[doc = "Do not set visible view size, rely upon explicit setVisibleSize call."]
2185 pub dont_set_visible_size: Option<bool>,
2186 #[builder(default)]
2187 #[serde(skip_serializing_if = "Option::is_none")]
2188 #[doc = "Screen orientation override."]
2189 pub screen_orientation: Option<emulation::ScreenOrientation>,
2190 #[builder(default)]
2191 #[serde(skip_serializing_if = "Option::is_none")]
2192 #[doc = "The viewport dimensions and scale. If not set, the override is cleared."]
2193 pub viewport: Option<Viewport>,
2194}
2195#[allow(deprecated)]
2196#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2197#[builder(setter(into, strip_option))]
2198#[serde(rename_all = "camelCase")]
2199#[doc = "Overrides the Device Orientation."]
2200#[deprecated]
2201pub struct SetDeviceOrientationOverride {
2202 #[serde(default)]
2203 #[doc = "Mock alpha"]
2204 pub alpha: JsFloat,
2205 #[serde(default)]
2206 #[doc = "Mock beta"]
2207 pub beta: JsFloat,
2208 #[serde(default)]
2209 #[doc = "Mock gamma"]
2210 pub gamma: JsFloat,
2211}
2212#[allow(deprecated)]
2213#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2214#[builder(setter(into, strip_option))]
2215#[serde(rename_all = "camelCase")]
2216#[doc = "Set generic font families."]
2217pub struct SetFontFamilies {
2218 #[doc = "Specifies font families to set. If a font family is not specified, it won't be changed."]
2219 pub font_families: FontFamilies,
2220 #[builder(default)]
2221 #[serde(skip_serializing_if = "Option::is_none")]
2222 #[doc = "Specifies font families to set for individual scripts."]
2223 pub for_scripts: Option<Vec<ScriptFontFamilies>>,
2224}
2225#[allow(deprecated)]
2226#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2227#[builder(setter(into, strip_option))]
2228#[serde(rename_all = "camelCase")]
2229#[doc = "Set default font sizes."]
2230pub struct SetFontSizes {
2231 #[doc = "Specifies font sizes to set. If a font size is not specified, it won't be changed."]
2232 pub font_sizes: FontSizes,
2233}
2234#[allow(deprecated)]
2235#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2236#[builder(setter(into, strip_option))]
2237#[serde(rename_all = "camelCase")]
2238#[doc = "Sets given markup as the document's HTML."]
2239pub struct SetDocumentContent {
2240 #[doc = "Frame id to set HTML for."]
2241 pub frame_id: FrameId,
2242 #[serde(default)]
2243 #[doc = "HTML content to set."]
2244 pub html: String,
2245}
2246#[allow(deprecated)]
2247#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2248#[builder(setter(into, strip_option))]
2249#[serde(rename_all = "camelCase")]
2250#[doc = "Set the behavior when downloading a file."]
2251#[deprecated]
2252pub struct SetDownloadBehavior {
2253 #[doc = "Whether to allow all or deny all download requests, or use default Chrome behavior if\n available (otherwise deny)."]
2254 pub behavior: SetDownloadBehaviorBehaviorOption,
2255 #[builder(default)]
2256 #[serde(skip_serializing_if = "Option::is_none")]
2257 #[serde(default)]
2258 #[doc = "The default path to save downloaded files to. This is required if behavior is set to 'allow'"]
2259 pub download_path: Option<String>,
2260}
2261#[allow(deprecated)]
2262#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2263#[builder(setter(into, strip_option))]
2264#[serde(rename_all = "camelCase")]
2265#[doc = "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position\n unavailable."]
2266#[deprecated]
2267pub struct SetGeolocationOverride {
2268 #[builder(default)]
2269 #[serde(skip_serializing_if = "Option::is_none")]
2270 #[serde(default)]
2271 #[doc = "Mock latitude"]
2272 pub latitude: Option<JsFloat>,
2273 #[builder(default)]
2274 #[serde(skip_serializing_if = "Option::is_none")]
2275 #[serde(default)]
2276 #[doc = "Mock longitude"]
2277 pub longitude: Option<JsFloat>,
2278 #[builder(default)]
2279 #[serde(skip_serializing_if = "Option::is_none")]
2280 #[serde(default)]
2281 #[doc = "Mock accuracy"]
2282 pub accuracy: Option<JsFloat>,
2283}
2284#[allow(deprecated)]
2285#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2286#[builder(setter(into, strip_option))]
2287#[serde(rename_all = "camelCase")]
2288#[doc = "Controls whether page will emit lifecycle events."]
2289pub struct SetLifecycleEventsEnabled {
2290 #[serde(default)]
2291 #[doc = "If true, starts emitting lifecycle events."]
2292 pub enabled: bool,
2293}
2294#[allow(deprecated)]
2295#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2296#[builder(setter(into, strip_option))]
2297#[serde(rename_all = "camelCase")]
2298#[doc = "Toggles mouse event-based touch event emulation."]
2299#[deprecated]
2300pub struct SetTouchEmulationEnabled {
2301 #[serde(default)]
2302 #[doc = "Whether the touch event emulation should be enabled."]
2303 pub enabled: bool,
2304 #[builder(default)]
2305 #[serde(skip_serializing_if = "Option::is_none")]
2306 #[doc = "Touch/gesture events configuration. Default: current platform."]
2307 pub configuration: Option<SetTouchEmulationEnabledConfigurationOption>,
2308}
2309#[allow(deprecated)]
2310#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2311#[builder(setter(into, strip_option))]
2312#[serde(rename_all = "camelCase")]
2313#[doc = "Starts sending each frame using the `screencastFrame` event."]
2314pub struct StartScreencast {
2315 #[builder(default)]
2316 #[serde(skip_serializing_if = "Option::is_none")]
2317 #[doc = "Image compression format."]
2318 pub format: Option<StartScreencastFormatOption>,
2319 #[builder(default)]
2320 #[serde(skip_serializing_if = "Option::is_none")]
2321 #[serde(default)]
2322 #[doc = "Compression quality from range \\[0..100\\]."]
2323 pub quality: Option<JsUInt>,
2324 #[builder(default)]
2325 #[serde(skip_serializing_if = "Option::is_none")]
2326 #[serde(default)]
2327 #[doc = "Maximum screenshot width."]
2328 pub max_width: Option<JsUInt>,
2329 #[builder(default)]
2330 #[serde(skip_serializing_if = "Option::is_none")]
2331 #[serde(default)]
2332 #[doc = "Maximum screenshot height."]
2333 pub max_height: Option<JsUInt>,
2334 #[builder(default)]
2335 #[serde(skip_serializing_if = "Option::is_none")]
2336 #[serde(default)]
2337 #[doc = "Send every n-th frame."]
2338 pub every_nth_frame: Option<JsUInt>,
2339}
2340#[allow(deprecated)]
2341#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2342pub struct StopLoading(pub Option<Json>);
2343#[allow(deprecated)]
2344#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2345pub struct Crash(pub Option<Json>);
2346#[allow(deprecated)]
2347#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2348pub struct Close(pub Option<Json>);
2349#[allow(deprecated)]
2350#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2351#[builder(setter(into, strip_option))]
2352#[serde(rename_all = "camelCase")]
2353#[doc = "Tries to update the web lifecycle state of the page.\n It will transition the page to the given state according to:\n <https://github.com/WICG/web-lifecycle/>"]
2354pub struct SetWebLifecycleState {
2355 #[doc = "Target lifecycle state"]
2356 pub state: SetWebLifecycleStateStateOption,
2357}
2358#[allow(deprecated)]
2359#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2360pub struct StopScreencast(pub Option<Json>);
2361#[allow(deprecated)]
2362#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2363#[builder(setter(into, strip_option))]
2364#[serde(rename_all = "camelCase")]
2365#[doc = "Requests backend to produce compilation cache for the specified scripts.\n `scripts` are appended to the list of scripts for which the cache\n would be produced. The list may be reset during page navigation.\n When script with a matching URL is encountered, the cache is optionally\n produced upon backend discretion, based on internal heuristics.\n See also: `Page.compilationCacheProduced`."]
2366pub struct ProduceCompilationCache {
2367 pub scripts: Vec<CompilationCacheParams>,
2368}
2369#[allow(deprecated)]
2370#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2371#[builder(setter(into, strip_option))]
2372#[serde(rename_all = "camelCase")]
2373#[doc = "Seeds compilation cache for given url. Compilation cache does not survive\n cross-process navigation."]
2374pub struct AddCompilationCache {
2375 #[serde(default)]
2376 pub url: String,
2377 #[doc = "Base64-encoded data"]
2378 pub data: Vec<u8>,
2379}
2380#[allow(deprecated)]
2381#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2382pub struct ClearCompilationCache(pub Option<Json>);
2383#[allow(deprecated)]
2384#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2385#[builder(setter(into, strip_option))]
2386#[serde(rename_all = "camelCase")]
2387#[doc = "Sets the Secure Payment Confirmation transaction mode.\n <https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode>"]
2388pub struct SetSPCTransactionMode {
2389 pub mode: SetSpcTransactionModeModeOption,
2390}
2391#[allow(deprecated)]
2392#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2393#[builder(setter(into, strip_option))]
2394#[serde(rename_all = "camelCase")]
2395#[doc = "Extensions for Custom Handlers API:\n <https://html.spec.whatwg.org/multipage/system-state.html#rph-automation>"]
2396pub struct SetRPHRegistrationMode {
2397 pub mode: SetRphRegistrationModeModeOption,
2398}
2399#[allow(deprecated)]
2400#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2401#[builder(setter(into, strip_option))]
2402#[serde(rename_all = "camelCase")]
2403#[doc = "Generates a report for testing."]
2404pub struct GenerateTestReport {
2405 #[serde(default)]
2406 #[doc = "Message to be displayed in the report."]
2407 pub message: String,
2408 #[builder(default)]
2409 #[serde(skip_serializing_if = "Option::is_none")]
2410 #[serde(default)]
2411 #[doc = "Specifies the endpoint group to deliver the report to."]
2412 pub group: Option<String>,
2413}
2414#[allow(deprecated)]
2415#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2416pub struct WaitForDebugger(pub Option<Json>);
2417#[allow(deprecated)]
2418#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2419#[builder(setter(into, strip_option))]
2420#[serde(rename_all = "camelCase")]
2421#[doc = "Intercept file chooser requests and transfer control to protocol clients.\n When file chooser interception is enabled, native file chooser dialog is not shown.\n Instead, a protocol event `Page.fileChooserOpened` is emitted."]
2422pub struct SetInterceptFileChooserDialog {
2423 #[serde(default)]
2424 pub enabled: bool,
2425 #[builder(default)]
2426 #[serde(skip_serializing_if = "Option::is_none")]
2427 #[serde(default)]
2428 #[doc = "If true, cancels the dialog by emitting relevant events (if any)\n in addition to not showing it if the interception is enabled\n (default: false)."]
2429 pub cancel: Option<bool>,
2430}
2431#[allow(deprecated)]
2432#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2433#[builder(setter(into, strip_option))]
2434#[serde(rename_all = "camelCase")]
2435#[doc = "Enable/disable prerendering manually.\n \n This command is a short-term solution for <https://crbug.com/1440085>.\n See <https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA>\n for more details.\n \n TODO(<https://crbug.com/1440085>): Remove this once Puppeteer supports tab targets."]
2436pub struct SetPrerenderingAllowed {
2437 #[serde(default)]
2438 pub is_allowed: bool,
2439}
2440#[allow(deprecated)]
2441#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2442#[builder(setter(into, strip_option))]
2443#[serde(rename_all = "camelCase")]
2444#[doc = "Get the annotated page content for the main frame.\n This is an experimental command that is subject to change."]
2445pub struct GetAnnotatedPageContent {
2446 #[builder(default)]
2447 #[serde(skip_serializing_if = "Option::is_none")]
2448 #[serde(default)]
2449 #[doc = "Whether to include actionable information. Defaults to true."]
2450 pub include_actionable_information: Option<bool>,
2451}
2452#[allow(deprecated)]
2453#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2454#[serde(rename_all = "camelCase")]
2455#[doc = "Deprecated, please use addScriptToEvaluateOnNewDocument instead."]
2456#[deprecated]
2457pub struct AddScriptToEvaluateOnLoadReturnObject {
2458 #[doc = "Identifier of the added script."]
2459 pub identifier: ScriptIdentifier,
2460}
2461#[allow(deprecated)]
2462#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2463#[serde(rename_all = "camelCase")]
2464#[doc = "Evaluates given script in every frame upon creation (before loading frame's scripts)."]
2465pub struct AddScriptToEvaluateOnNewDocumentReturnObject {
2466 #[doc = "Identifier of the added script."]
2467 pub identifier: ScriptIdentifier,
2468}
2469#[allow(deprecated)]
2470#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2471#[doc = "Brings page to front (activates tab)."]
2472pub struct BringToFrontReturnObject(pub Option<Json>);
2473#[allow(deprecated)]
2474#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2475#[serde(rename_all = "camelCase")]
2476#[doc = "Capture page screenshot."]
2477pub struct CaptureScreenshotReturnObject {
2478 #[doc = "Base64-encoded image data."]
2479 pub data: String,
2480}
2481#[allow(deprecated)]
2482#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2483#[serde(rename_all = "camelCase")]
2484#[doc = "Returns a snapshot of the page as a string. For MHTML format, the serialization includes\n iframes, shadow DOM, external resources, and element-inline styles."]
2485pub struct CaptureSnapshotReturnObject {
2486 #[serde(default)]
2487 #[doc = "Serialized page data."]
2488 pub data: String,
2489}
2490#[allow(deprecated)]
2491#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2492#[doc = "Clears the overridden device metrics."]
2493#[deprecated]
2494pub struct ClearDeviceMetricsOverrideReturnObject(pub Option<Json>);
2495#[allow(deprecated)]
2496#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2497#[doc = "Clears the overridden Device Orientation."]
2498#[deprecated]
2499pub struct ClearDeviceOrientationOverrideReturnObject(pub Option<Json>);
2500#[allow(deprecated)]
2501#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2502#[doc = "Clears the overridden Geolocation Position and Error."]
2503#[deprecated]
2504pub struct ClearGeolocationOverrideReturnObject(pub Option<Json>);
2505#[allow(deprecated)]
2506#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2507#[serde(rename_all = "camelCase")]
2508#[doc = "Creates an isolated world for the given frame."]
2509pub struct CreateIsolatedWorldReturnObject {
2510 #[doc = "Execution context of the isolated world."]
2511 pub execution_context_id: runtime::ExecutionContextId,
2512}
2513#[allow(deprecated)]
2514#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2515#[doc = "Deletes browser cookie with given name, domain and path."]
2516#[deprecated]
2517pub struct DeleteCookieReturnObject(pub Option<Json>);
2518#[allow(deprecated)]
2519#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2520#[doc = "Disables page domain notifications."]
2521pub struct DisableReturnObject(pub Option<Json>);
2522#[allow(deprecated)]
2523#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2524#[doc = "Enables page domain notifications."]
2525pub struct EnableReturnObject(pub Option<Json>);
2526#[allow(deprecated)]
2527#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2528#[serde(rename_all = "camelCase")]
2529#[doc = "Gets the processed manifest for this current document.\n This API always waits for the manifest to be loaded.\n If manifestId is provided, and it does not match the manifest of the\n current document, this API errors out.\n If there is not a loaded page, this API errors out immediately."]
2530pub struct GetAppManifestReturnObject {
2531 #[serde(default)]
2532 #[doc = "Manifest location."]
2533 pub url: String,
2534 pub errors: Vec<AppManifestError>,
2535 #[builder(default)]
2536 #[serde(skip_serializing_if = "Option::is_none")]
2537 #[serde(default)]
2538 #[doc = "Manifest content."]
2539 pub data: Option<String>,
2540 #[builder(default)]
2541 #[serde(skip_serializing_if = "Option::is_none")]
2542 #[doc = "Parsed manifest properties. Deprecated, use manifest instead."]
2543 #[deprecated]
2544 pub parsed: Option<AppManifestParsedProperties>,
2545 pub manifest: WebAppManifest,
2546}
2547#[allow(deprecated)]
2548#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2549#[serde(rename_all = "camelCase")]
2550pub struct GetInstallabilityErrorsReturnObject {
2551 pub installability_errors: Vec<InstallabilityError>,
2552}
2553#[allow(deprecated)]
2554#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2555#[serde(rename_all = "camelCase")]
2556#[doc = "Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation."]
2557#[deprecated]
2558pub struct GetManifestIconsReturnObject {
2559 #[builder(default)]
2560 #[serde(skip_serializing_if = "Option::is_none")]
2561 pub primary_icon: Option<String>,
2562}
2563#[allow(deprecated)]
2564#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2565#[serde(rename_all = "camelCase")]
2566#[doc = "Returns the unique (PWA) app id.\n Only returns values if the feature flag 'WebAppEnableManifestId' is enabled"]
2567pub struct GetAppIdReturnObject {
2568 #[builder(default)]
2569 #[serde(skip_serializing_if = "Option::is_none")]
2570 #[serde(default)]
2571 #[doc = "App id, either from manifest's id attribute or computed from start_url"]
2572 pub app_id: Option<String>,
2573 #[builder(default)]
2574 #[serde(skip_serializing_if = "Option::is_none")]
2575 #[serde(default)]
2576 #[doc = "Recommendation for manifest's id attribute to match current id computed from start_url"]
2577 pub recommended_id: Option<String>,
2578}
2579#[allow(deprecated)]
2580#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2581#[serde(rename_all = "camelCase")]
2582pub struct GetAdScriptAncestryReturnObject {
2583 #[builder(default)]
2584 #[serde(skip_serializing_if = "Option::is_none")]
2585 #[doc = "The ancestry chain of ad script identifiers leading to this frame's\n creation, along with the root script's filterlist rule. The ancestry\n chain is ordered from the most immediate script (in the frame creation\n stack) to more distant ancestors (that created the immediately preceding\n script). Only sent if frame is labelled as an ad and ids are available."]
2586 pub ad_script_ancestry: Option<AdScriptAncestry>,
2587}
2588#[allow(deprecated)]
2589#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2590#[serde(rename_all = "camelCase")]
2591#[doc = "Returns present frame tree structure."]
2592pub struct GetFrameTreeReturnObject {
2593 #[doc = "Present frame tree structure."]
2594 pub frame_tree: FrameTree,
2595}
2596#[allow(deprecated)]
2597#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2598#[serde(rename_all = "camelCase")]
2599#[doc = "Returns metrics relating to the layouting of the page, such as viewport bounds/scale."]
2600pub struct GetLayoutMetricsReturnObject {
2601 #[doc = "Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead."]
2602 #[deprecated]
2603 pub layout_viewport: LayoutViewport,
2604 #[doc = "Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead."]
2605 #[deprecated]
2606 pub visual_viewport: VisualViewport,
2607 #[doc = "Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead."]
2608 #[deprecated]
2609 pub content_size: dom::Rect,
2610 #[doc = "Metrics relating to the layout viewport in CSS pixels."]
2611 pub css_layout_viewport: LayoutViewport,
2612 #[doc = "Metrics relating to the visual viewport in CSS pixels."]
2613 pub css_visual_viewport: VisualViewport,
2614 #[doc = "Size of scrollable area in CSS pixels."]
2615 pub css_content_size: dom::Rect,
2616}
2617#[allow(deprecated)]
2618#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2619#[serde(rename_all = "camelCase")]
2620#[doc = "Returns navigation history for the current page."]
2621pub struct GetNavigationHistoryReturnObject {
2622 #[serde(default)]
2623 #[doc = "Index of the current navigation history entry."]
2624 pub current_index: JsUInt,
2625 #[doc = "Array of navigation history entries."]
2626 pub entries: Vec<NavigationEntry>,
2627}
2628#[allow(deprecated)]
2629#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2630#[doc = "Resets navigation history for the current page."]
2631pub struct ResetNavigationHistoryReturnObject(pub Option<Json>);
2632#[allow(deprecated)]
2633#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2634#[serde(rename_all = "camelCase")]
2635#[doc = "Returns content of the given resource."]
2636pub struct GetResourceContentReturnObject {
2637 #[serde(default)]
2638 #[doc = "Resource content."]
2639 pub content: String,
2640 #[serde(default)]
2641 #[doc = "True, if content was served as base64."]
2642 pub base_64_encoded: bool,
2643}
2644#[allow(deprecated)]
2645#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2646#[serde(rename_all = "camelCase")]
2647#[doc = "Returns present frame / resource tree structure."]
2648pub struct GetResourceTreeReturnObject {
2649 #[doc = "Present frame / resource tree structure."]
2650 pub frame_tree: FrameResourceTree,
2651}
2652#[allow(deprecated)]
2653#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2654#[doc = "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload)."]
2655pub struct HandleJavaScriptDialogReturnObject(pub Option<Json>);
2656#[allow(deprecated)]
2657#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2658#[serde(rename_all = "camelCase")]
2659#[doc = "Navigates current page to the given URL."]
2660pub struct NavigateReturnObject {
2661 #[doc = "Frame id that has navigated (or failed to navigate)"]
2662 pub frame_id: FrameId,
2663 #[builder(default)]
2664 #[serde(skip_serializing_if = "Option::is_none")]
2665 #[doc = "Loader identifier. This is omitted in case of same-document navigation,\n as the previously committed loaderId would not change."]
2666 pub loader_id: Option<network::LoaderId>,
2667 #[builder(default)]
2668 #[serde(skip_serializing_if = "Option::is_none")]
2669 #[serde(default)]
2670 #[doc = "User friendly error message, present if and only if navigation has failed."]
2671 pub error_text: Option<String>,
2672 #[builder(default)]
2673 #[serde(skip_serializing_if = "Option::is_none")]
2674 #[serde(default)]
2675 #[doc = "Whether the navigation resulted in a download."]
2676 pub is_download: Option<bool>,
2677}
2678#[allow(deprecated)]
2679#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2680#[doc = "Navigates current page to the given history entry."]
2681pub struct NavigateToHistoryEntryReturnObject(pub Option<Json>);
2682#[allow(deprecated)]
2683#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2684#[serde(rename_all = "camelCase")]
2685#[doc = "Print page as PDF."]
2686pub struct PrintToPDFReturnObject {
2687 #[doc = "Base64-encoded pdf data. Empty if |returnAsStream| is specified."]
2688 pub data: String,
2689 #[builder(default)]
2690 #[serde(skip_serializing_if = "Option::is_none")]
2691 #[doc = "A handle of the stream that holds resulting PDF data."]
2692 pub stream: Option<io::StreamHandle>,
2693}
2694#[allow(deprecated)]
2695#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2696#[doc = "Reloads given page optionally ignoring the cache."]
2697pub struct ReloadReturnObject(pub Option<Json>);
2698#[allow(deprecated)]
2699#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2700#[doc = "Deprecated, please use removeScriptToEvaluateOnNewDocument instead."]
2701#[deprecated]
2702pub struct RemoveScriptToEvaluateOnLoadReturnObject(pub Option<Json>);
2703#[allow(deprecated)]
2704#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2705#[doc = "Removes given script from the list."]
2706pub struct RemoveScriptToEvaluateOnNewDocumentReturnObject(pub Option<Json>);
2707#[allow(deprecated)]
2708#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2709#[doc = "Acknowledges that a screencast frame has been received by the frontend."]
2710pub struct ScreencastFrameAckReturnObject(pub Option<Json>);
2711#[allow(deprecated)]
2712#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2713#[serde(rename_all = "camelCase")]
2714#[doc = "Searches for given string in resource content."]
2715pub struct SearchInResourceReturnObject {
2716 #[doc = "List of search matches."]
2717 pub result: debugger::SearchMatch,
2718}
2719#[allow(deprecated)]
2720#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2721#[doc = "Enable Chrome's experimental ad filter on all sites."]
2722pub struct SetAdBlockingEnabledReturnObject(pub Option<Json>);
2723#[allow(deprecated)]
2724#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2725#[doc = "Enable page Content Security Policy by-passing."]
2726pub struct SetBypassCSPReturnObject(pub Option<Json>);
2727#[allow(deprecated)]
2728#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2729#[serde(rename_all = "camelCase")]
2730#[doc = "Get Permissions Policy state on given frame."]
2731pub struct GetPermissionsPolicyStateReturnObject {
2732 pub states: Vec<PermissionsPolicyFeatureState>,
2733}
2734#[allow(deprecated)]
2735#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2736#[serde(rename_all = "camelCase")]
2737#[doc = "Get Origin Trials on given frame."]
2738pub struct GetOriginTrialsReturnObject {
2739 pub origin_trials: Vec<OriginTrial>,
2740}
2741#[allow(deprecated)]
2742#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2743#[doc = "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\n window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\n query results)."]
2744#[deprecated]
2745pub struct SetDeviceMetricsOverrideReturnObject(pub Option<Json>);
2746#[allow(deprecated)]
2747#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2748#[doc = "Overrides the Device Orientation."]
2749#[deprecated]
2750pub struct SetDeviceOrientationOverrideReturnObject(pub Option<Json>);
2751#[allow(deprecated)]
2752#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2753#[doc = "Set generic font families."]
2754pub struct SetFontFamiliesReturnObject(pub Option<Json>);
2755#[allow(deprecated)]
2756#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2757#[doc = "Set default font sizes."]
2758pub struct SetFontSizesReturnObject(pub Option<Json>);
2759#[allow(deprecated)]
2760#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2761#[doc = "Sets given markup as the document's HTML."]
2762pub struct SetDocumentContentReturnObject(pub Option<Json>);
2763#[allow(deprecated)]
2764#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2765#[doc = "Set the behavior when downloading a file."]
2766#[deprecated]
2767pub struct SetDownloadBehaviorReturnObject(pub Option<Json>);
2768#[allow(deprecated)]
2769#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2770#[doc = "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position\n unavailable."]
2771#[deprecated]
2772pub struct SetGeolocationOverrideReturnObject(pub Option<Json>);
2773#[allow(deprecated)]
2774#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2775#[doc = "Controls whether page will emit lifecycle events."]
2776pub struct SetLifecycleEventsEnabledReturnObject(pub Option<Json>);
2777#[allow(deprecated)]
2778#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2779#[doc = "Toggles mouse event-based touch event emulation."]
2780#[deprecated]
2781pub struct SetTouchEmulationEnabledReturnObject(pub Option<Json>);
2782#[allow(deprecated)]
2783#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2784#[doc = "Starts sending each frame using the `screencastFrame` event."]
2785pub struct StartScreencastReturnObject(pub Option<Json>);
2786#[allow(deprecated)]
2787#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2788#[doc = "Force the page stop all navigations and pending resource fetches."]
2789pub struct StopLoadingReturnObject(pub Option<Json>);
2790#[allow(deprecated)]
2791#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2792#[doc = "Crashes renderer on the IO thread, generates minidumps."]
2793pub struct CrashReturnObject(pub Option<Json>);
2794#[allow(deprecated)]
2795#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2796#[doc = "Tries to close page, running its beforeunload hooks, if any."]
2797pub struct CloseReturnObject(pub Option<Json>);
2798#[allow(deprecated)]
2799#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2800#[doc = "Tries to update the web lifecycle state of the page.\n It will transition the page to the given state according to:\n <https://github.com/WICG/web-lifecycle/>"]
2801pub struct SetWebLifecycleStateReturnObject(pub Option<Json>);
2802#[allow(deprecated)]
2803#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2804#[doc = "Stops sending each frame in the `screencastFrame`."]
2805pub struct StopScreencastReturnObject(pub Option<Json>);
2806#[allow(deprecated)]
2807#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2808#[doc = "Requests backend to produce compilation cache for the specified scripts.\n `scripts` are appended to the list of scripts for which the cache\n would be produced. The list may be reset during page navigation.\n When script with a matching URL is encountered, the cache is optionally\n produced upon backend discretion, based on internal heuristics.\n See also: `Page.compilationCacheProduced`."]
2809pub struct ProduceCompilationCacheReturnObject(pub Option<Json>);
2810#[allow(deprecated)]
2811#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2812#[doc = "Seeds compilation cache for given url. Compilation cache does not survive\n cross-process navigation."]
2813pub struct AddCompilationCacheReturnObject(pub Option<Json>);
2814#[allow(deprecated)]
2815#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2816#[doc = "Clears seeded compilation cache."]
2817pub struct ClearCompilationCacheReturnObject(pub Option<Json>);
2818#[allow(deprecated)]
2819#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2820#[doc = "Sets the Secure Payment Confirmation transaction mode.\n <https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode>"]
2821pub struct SetSPCTransactionModeReturnObject(pub Option<Json>);
2822#[allow(deprecated)]
2823#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2824#[doc = "Extensions for Custom Handlers API:\n <https://html.spec.whatwg.org/multipage/system-state.html#rph-automation>"]
2825pub struct SetRPHRegistrationModeReturnObject(pub Option<Json>);
2826#[allow(deprecated)]
2827#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2828#[doc = "Generates a report for testing."]
2829pub struct GenerateTestReportReturnObject(pub Option<Json>);
2830#[allow(deprecated)]
2831#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2832#[doc = "Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger."]
2833pub struct WaitForDebuggerReturnObject(pub Option<Json>);
2834#[allow(deprecated)]
2835#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2836#[doc = "Intercept file chooser requests and transfer control to protocol clients.\n When file chooser interception is enabled, native file chooser dialog is not shown.\n Instead, a protocol event `Page.fileChooserOpened` is emitted."]
2837pub struct SetInterceptFileChooserDialogReturnObject(pub Option<Json>);
2838#[allow(deprecated)]
2839#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
2840#[doc = "Enable/disable prerendering manually.\n \n This command is a short-term solution for <https://crbug.com/1440085>.\n See <https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA>\n for more details.\n \n TODO(<https://crbug.com/1440085>): Remove this once Puppeteer supports tab targets."]
2841pub struct SetPrerenderingAllowedReturnObject(pub Option<Json>);
2842#[allow(deprecated)]
2843#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
2844#[serde(rename_all = "camelCase")]
2845#[doc = "Get the annotated page content for the main frame.\n This is an experimental command that is subject to change."]
2846pub struct GetAnnotatedPageContentReturnObject {
2847 #[doc = "The annotated page content as a base64 encoded protobuf.\n The format is defined by the `AnnotatedPageContent` message in\n components/optimization_guide/proto/features/common_quality_data.proto"]
2848 pub content: String,
2849}
2850#[allow(deprecated)]
2851impl Method for AddScriptToEvaluateOnLoad {
2852 const NAME: &'static str = "Page.addScriptToEvaluateOnLoad";
2853 type ReturnObject = AddScriptToEvaluateOnLoadReturnObject;
2854}
2855#[allow(deprecated)]
2856impl Method for AddScriptToEvaluateOnNewDocument {
2857 const NAME: &'static str = "Page.addScriptToEvaluateOnNewDocument";
2858 type ReturnObject = AddScriptToEvaluateOnNewDocumentReturnObject;
2859}
2860#[allow(deprecated)]
2861impl Method for BringToFront {
2862 const NAME: &'static str = "Page.bringToFront";
2863 type ReturnObject = BringToFrontReturnObject;
2864}
2865#[allow(deprecated)]
2866impl Method for CaptureScreenshot {
2867 const NAME: &'static str = "Page.captureScreenshot";
2868 type ReturnObject = CaptureScreenshotReturnObject;
2869}
2870#[allow(deprecated)]
2871impl Method for CaptureSnapshot {
2872 const NAME: &'static str = "Page.captureSnapshot";
2873 type ReturnObject = CaptureSnapshotReturnObject;
2874}
2875#[allow(deprecated)]
2876impl Method for ClearDeviceMetricsOverride {
2877 const NAME: &'static str = "Page.clearDeviceMetricsOverride";
2878 type ReturnObject = ClearDeviceMetricsOverrideReturnObject;
2879}
2880#[allow(deprecated)]
2881impl Method for ClearDeviceOrientationOverride {
2882 const NAME: &'static str = "Page.clearDeviceOrientationOverride";
2883 type ReturnObject = ClearDeviceOrientationOverrideReturnObject;
2884}
2885#[allow(deprecated)]
2886impl Method for ClearGeolocationOverride {
2887 const NAME: &'static str = "Page.clearGeolocationOverride";
2888 type ReturnObject = ClearGeolocationOverrideReturnObject;
2889}
2890#[allow(deprecated)]
2891impl Method for CreateIsolatedWorld {
2892 const NAME: &'static str = "Page.createIsolatedWorld";
2893 type ReturnObject = CreateIsolatedWorldReturnObject;
2894}
2895#[allow(deprecated)]
2896impl Method for DeleteCookie {
2897 const NAME: &'static str = "Page.deleteCookie";
2898 type ReturnObject = DeleteCookieReturnObject;
2899}
2900#[allow(deprecated)]
2901impl Method for Disable {
2902 const NAME: &'static str = "Page.disable";
2903 type ReturnObject = DisableReturnObject;
2904}
2905#[allow(deprecated)]
2906impl Method for Enable {
2907 const NAME: &'static str = "Page.enable";
2908 type ReturnObject = EnableReturnObject;
2909}
2910#[allow(deprecated)]
2911impl Method for GetAppManifest {
2912 const NAME: &'static str = "Page.getAppManifest";
2913 type ReturnObject = GetAppManifestReturnObject;
2914}
2915#[allow(deprecated)]
2916impl Method for GetInstallabilityErrors {
2917 const NAME: &'static str = "Page.getInstallabilityErrors";
2918 type ReturnObject = GetInstallabilityErrorsReturnObject;
2919}
2920#[allow(deprecated)]
2921impl Method for GetManifestIcons {
2922 const NAME: &'static str = "Page.getManifestIcons";
2923 type ReturnObject = GetManifestIconsReturnObject;
2924}
2925#[allow(deprecated)]
2926impl Method for GetAppId {
2927 const NAME: &'static str = "Page.getAppId";
2928 type ReturnObject = GetAppIdReturnObject;
2929}
2930#[allow(deprecated)]
2931impl Method for GetAdScriptAncestry {
2932 const NAME: &'static str = "Page.getAdScriptAncestry";
2933 type ReturnObject = GetAdScriptAncestryReturnObject;
2934}
2935#[allow(deprecated)]
2936impl Method for GetFrameTree {
2937 const NAME: &'static str = "Page.getFrameTree";
2938 type ReturnObject = GetFrameTreeReturnObject;
2939}
2940#[allow(deprecated)]
2941impl Method for GetLayoutMetrics {
2942 const NAME: &'static str = "Page.getLayoutMetrics";
2943 type ReturnObject = GetLayoutMetricsReturnObject;
2944}
2945#[allow(deprecated)]
2946impl Method for GetNavigationHistory {
2947 const NAME: &'static str = "Page.getNavigationHistory";
2948 type ReturnObject = GetNavigationHistoryReturnObject;
2949}
2950#[allow(deprecated)]
2951impl Method for ResetNavigationHistory {
2952 const NAME: &'static str = "Page.resetNavigationHistory";
2953 type ReturnObject = ResetNavigationHistoryReturnObject;
2954}
2955#[allow(deprecated)]
2956impl Method for GetResourceContent {
2957 const NAME: &'static str = "Page.getResourceContent";
2958 type ReturnObject = GetResourceContentReturnObject;
2959}
2960#[allow(deprecated)]
2961impl Method for GetResourceTree {
2962 const NAME: &'static str = "Page.getResourceTree";
2963 type ReturnObject = GetResourceTreeReturnObject;
2964}
2965#[allow(deprecated)]
2966impl Method for HandleJavaScriptDialog {
2967 const NAME: &'static str = "Page.handleJavaScriptDialog";
2968 type ReturnObject = HandleJavaScriptDialogReturnObject;
2969}
2970#[allow(deprecated)]
2971impl Method for Navigate {
2972 const NAME: &'static str = "Page.navigate";
2973 type ReturnObject = NavigateReturnObject;
2974}
2975#[allow(deprecated)]
2976impl Method for NavigateToHistoryEntry {
2977 const NAME: &'static str = "Page.navigateToHistoryEntry";
2978 type ReturnObject = NavigateToHistoryEntryReturnObject;
2979}
2980#[allow(deprecated)]
2981impl Method for PrintToPDF {
2982 const NAME: &'static str = "Page.printToPDF";
2983 type ReturnObject = PrintToPDFReturnObject;
2984}
2985#[allow(deprecated)]
2986impl Method for Reload {
2987 const NAME: &'static str = "Page.reload";
2988 type ReturnObject = ReloadReturnObject;
2989}
2990#[allow(deprecated)]
2991impl Method for RemoveScriptToEvaluateOnLoad {
2992 const NAME: &'static str = "Page.removeScriptToEvaluateOnLoad";
2993 type ReturnObject = RemoveScriptToEvaluateOnLoadReturnObject;
2994}
2995#[allow(deprecated)]
2996impl Method for RemoveScriptToEvaluateOnNewDocument {
2997 const NAME: &'static str = "Page.removeScriptToEvaluateOnNewDocument";
2998 type ReturnObject = RemoveScriptToEvaluateOnNewDocumentReturnObject;
2999}
3000#[allow(deprecated)]
3001impl Method for ScreencastFrameAck {
3002 const NAME: &'static str = "Page.screencastFrameAck";
3003 type ReturnObject = ScreencastFrameAckReturnObject;
3004}
3005#[allow(deprecated)]
3006impl Method for SearchInResource {
3007 const NAME: &'static str = "Page.searchInResource";
3008 type ReturnObject = SearchInResourceReturnObject;
3009}
3010#[allow(deprecated)]
3011impl Method for SetAdBlockingEnabled {
3012 const NAME: &'static str = "Page.setAdBlockingEnabled";
3013 type ReturnObject = SetAdBlockingEnabledReturnObject;
3014}
3015#[allow(deprecated)]
3016impl Method for SetBypassCSP {
3017 const NAME: &'static str = "Page.setBypassCSP";
3018 type ReturnObject = SetBypassCSPReturnObject;
3019}
3020#[allow(deprecated)]
3021impl Method for GetPermissionsPolicyState {
3022 const NAME: &'static str = "Page.getPermissionsPolicyState";
3023 type ReturnObject = GetPermissionsPolicyStateReturnObject;
3024}
3025#[allow(deprecated)]
3026impl Method for GetOriginTrials {
3027 const NAME: &'static str = "Page.getOriginTrials";
3028 type ReturnObject = GetOriginTrialsReturnObject;
3029}
3030#[allow(deprecated)]
3031impl Method for SetDeviceMetricsOverride {
3032 const NAME: &'static str = "Page.setDeviceMetricsOverride";
3033 type ReturnObject = SetDeviceMetricsOverrideReturnObject;
3034}
3035#[allow(deprecated)]
3036impl Method for SetDeviceOrientationOverride {
3037 const NAME: &'static str = "Page.setDeviceOrientationOverride";
3038 type ReturnObject = SetDeviceOrientationOverrideReturnObject;
3039}
3040#[allow(deprecated)]
3041impl Method for SetFontFamilies {
3042 const NAME: &'static str = "Page.setFontFamilies";
3043 type ReturnObject = SetFontFamiliesReturnObject;
3044}
3045#[allow(deprecated)]
3046impl Method for SetFontSizes {
3047 const NAME: &'static str = "Page.setFontSizes";
3048 type ReturnObject = SetFontSizesReturnObject;
3049}
3050#[allow(deprecated)]
3051impl Method for SetDocumentContent {
3052 const NAME: &'static str = "Page.setDocumentContent";
3053 type ReturnObject = SetDocumentContentReturnObject;
3054}
3055#[allow(deprecated)]
3056impl Method for SetDownloadBehavior {
3057 const NAME: &'static str = "Page.setDownloadBehavior";
3058 type ReturnObject = SetDownloadBehaviorReturnObject;
3059}
3060#[allow(deprecated)]
3061impl Method for SetGeolocationOverride {
3062 const NAME: &'static str = "Page.setGeolocationOverride";
3063 type ReturnObject = SetGeolocationOverrideReturnObject;
3064}
3065#[allow(deprecated)]
3066impl Method for SetLifecycleEventsEnabled {
3067 const NAME: &'static str = "Page.setLifecycleEventsEnabled";
3068 type ReturnObject = SetLifecycleEventsEnabledReturnObject;
3069}
3070#[allow(deprecated)]
3071impl Method for SetTouchEmulationEnabled {
3072 const NAME: &'static str = "Page.setTouchEmulationEnabled";
3073 type ReturnObject = SetTouchEmulationEnabledReturnObject;
3074}
3075#[allow(deprecated)]
3076impl Method for StartScreencast {
3077 const NAME: &'static str = "Page.startScreencast";
3078 type ReturnObject = StartScreencastReturnObject;
3079}
3080#[allow(deprecated)]
3081impl Method for StopLoading {
3082 const NAME: &'static str = "Page.stopLoading";
3083 type ReturnObject = StopLoadingReturnObject;
3084}
3085#[allow(deprecated)]
3086impl Method for Crash {
3087 const NAME: &'static str = "Page.crash";
3088 type ReturnObject = CrashReturnObject;
3089}
3090#[allow(deprecated)]
3091impl Method for Close {
3092 const NAME: &'static str = "Page.close";
3093 type ReturnObject = CloseReturnObject;
3094}
3095#[allow(deprecated)]
3096impl Method for SetWebLifecycleState {
3097 const NAME: &'static str = "Page.setWebLifecycleState";
3098 type ReturnObject = SetWebLifecycleStateReturnObject;
3099}
3100#[allow(deprecated)]
3101impl Method for StopScreencast {
3102 const NAME: &'static str = "Page.stopScreencast";
3103 type ReturnObject = StopScreencastReturnObject;
3104}
3105#[allow(deprecated)]
3106impl Method for ProduceCompilationCache {
3107 const NAME: &'static str = "Page.produceCompilationCache";
3108 type ReturnObject = ProduceCompilationCacheReturnObject;
3109}
3110#[allow(deprecated)]
3111impl Method for AddCompilationCache {
3112 const NAME: &'static str = "Page.addCompilationCache";
3113 type ReturnObject = AddCompilationCacheReturnObject;
3114}
3115#[allow(deprecated)]
3116impl Method for ClearCompilationCache {
3117 const NAME: &'static str = "Page.clearCompilationCache";
3118 type ReturnObject = ClearCompilationCacheReturnObject;
3119}
3120#[allow(deprecated)]
3121impl Method for SetSPCTransactionMode {
3122 const NAME: &'static str = "Page.setSPCTransactionMode";
3123 type ReturnObject = SetSPCTransactionModeReturnObject;
3124}
3125#[allow(deprecated)]
3126impl Method for SetRPHRegistrationMode {
3127 const NAME: &'static str = "Page.setRPHRegistrationMode";
3128 type ReturnObject = SetRPHRegistrationModeReturnObject;
3129}
3130#[allow(deprecated)]
3131impl Method for GenerateTestReport {
3132 const NAME: &'static str = "Page.generateTestReport";
3133 type ReturnObject = GenerateTestReportReturnObject;
3134}
3135#[allow(deprecated)]
3136impl Method for WaitForDebugger {
3137 const NAME: &'static str = "Page.waitForDebugger";
3138 type ReturnObject = WaitForDebuggerReturnObject;
3139}
3140#[allow(deprecated)]
3141impl Method for SetInterceptFileChooserDialog {
3142 const NAME: &'static str = "Page.setInterceptFileChooserDialog";
3143 type ReturnObject = SetInterceptFileChooserDialogReturnObject;
3144}
3145#[allow(deprecated)]
3146impl Method for SetPrerenderingAllowed {
3147 const NAME: &'static str = "Page.setPrerenderingAllowed";
3148 type ReturnObject = SetPrerenderingAllowedReturnObject;
3149}
3150#[allow(deprecated)]
3151impl Method for GetAnnotatedPageContent {
3152 const NAME: &'static str = "Page.getAnnotatedPageContent";
3153 type ReturnObject = GetAnnotatedPageContentReturnObject;
3154}
3155#[allow(dead_code)]
3156pub mod events {
3157 #[allow(unused_imports)]
3158 use super::super::types::*;
3159 #[allow(unused_imports)]
3160 use derive_builder::Builder;
3161 #[allow(unused_imports)]
3162 use serde::{Deserialize, Serialize};
3163 #[allow(unused_imports)]
3164 use serde_json::Value as Json;
3165 #[allow(deprecated)]
3166 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3167 pub struct DomContentEventFiredEvent {
3168 pub params: DomContentEventFiredEventParams,
3169 }
3170 #[allow(deprecated)]
3171 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3172 #[serde(rename_all = "camelCase")]
3173 pub struct DomContentEventFiredEventParams {
3174 pub timestamp: super::super::network::MonotonicTime,
3175 }
3176 #[allow(deprecated)]
3177 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3178 pub struct FileChooserOpenedEvent {
3179 pub params: FileChooserOpenedEventParams,
3180 }
3181 #[allow(deprecated)]
3182 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3183 #[serde(rename_all = "camelCase")]
3184 pub struct FileChooserOpenedEventParams {
3185 #[doc = "Id of the frame containing input node."]
3186 pub frame_id: super::FrameId,
3187 #[doc = "Input mode."]
3188 pub mode: super::FileChooserOpenedModeOption,
3189 #[builder(default)]
3190 #[serde(skip_serializing_if = "Option::is_none")]
3191 #[doc = "Input node id. Only present for file choosers opened via an `\\<input type=\"file\"\\>` element."]
3192 pub backend_node_id: Option<super::super::dom::BackendNodeId>,
3193 }
3194 #[allow(deprecated)]
3195 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3196 pub struct FrameAttachedEvent {
3197 pub params: FrameAttachedEventParams,
3198 }
3199 #[allow(deprecated)]
3200 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3201 #[serde(rename_all = "camelCase")]
3202 pub struct FrameAttachedEventParams {
3203 #[doc = "Id of the frame that has been attached."]
3204 pub frame_id: super::FrameId,
3205 #[doc = "Parent frame identifier."]
3206 pub parent_frame_id: super::FrameId,
3207 #[builder(default)]
3208 #[serde(skip_serializing_if = "Option::is_none")]
3209 #[doc = "JavaScript stack trace of when frame was attached, only set if frame initiated from script."]
3210 pub stack: Option<super::super::runtime::StackTrace>,
3211 }
3212 #[allow(deprecated)]
3213 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3214 pub struct FrameClearedScheduledNavigationEvent {
3215 pub params: FrameClearedScheduledNavigationEventParams,
3216 }
3217 #[allow(deprecated)]
3218 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3219 #[serde(rename_all = "camelCase")]
3220 pub struct FrameClearedScheduledNavigationEventParams {
3221 #[doc = "Id of the frame that has cleared its scheduled navigation."]
3222 pub frame_id: super::FrameId,
3223 }
3224 #[allow(deprecated)]
3225 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3226 pub struct FrameDetachedEvent {
3227 pub params: FrameDetachedEventParams,
3228 }
3229 #[allow(deprecated)]
3230 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3231 #[serde(rename_all = "camelCase")]
3232 pub struct FrameDetachedEventParams {
3233 #[doc = "Id of the frame that has been detached."]
3234 pub frame_id: super::FrameId,
3235 pub reason: super::FrameDetachedReasonOption,
3236 }
3237 #[allow(deprecated)]
3238 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3239 pub struct FrameSubtreeWillBeDetachedEvent {
3240 pub params: FrameSubtreeWillBeDetachedEventParams,
3241 }
3242 #[allow(deprecated)]
3243 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3244 #[serde(rename_all = "camelCase")]
3245 pub struct FrameSubtreeWillBeDetachedEventParams {
3246 #[doc = "Id of the frame that is the root of the subtree that will be detached."]
3247 pub frame_id: super::FrameId,
3248 }
3249 #[allow(deprecated)]
3250 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3251 pub struct FrameNavigatedEvent {
3252 pub params: FrameNavigatedEventParams,
3253 }
3254 #[allow(deprecated)]
3255 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3256 #[serde(rename_all = "camelCase")]
3257 pub struct FrameNavigatedEventParams {
3258 #[doc = "Frame object."]
3259 pub frame: super::Frame,
3260 pub r#type: super::NavigationType,
3261 }
3262 #[allow(deprecated)]
3263 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3264 pub struct DocumentOpenedEvent {
3265 pub params: DocumentOpenedEventParams,
3266 }
3267 #[allow(deprecated)]
3268 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3269 #[serde(rename_all = "camelCase")]
3270 pub struct DocumentOpenedEventParams {
3271 #[doc = "Frame object."]
3272 pub frame: super::Frame,
3273 }
3274 #[allow(deprecated)]
3275 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3276 pub struct FrameResizedEvent(pub Option<Json>);
3277 #[allow(deprecated)]
3278 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3279 pub struct FrameStartedNavigatingEvent {
3280 pub params: FrameStartedNavigatingEventParams,
3281 }
3282 #[allow(deprecated)]
3283 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3284 #[serde(rename_all = "camelCase")]
3285 pub struct FrameStartedNavigatingEventParams {
3286 #[doc = "ID of the frame that is being navigated."]
3287 pub frame_id: super::FrameId,
3288 #[serde(default)]
3289 #[doc = "The URL the navigation started with. The final URL can be different."]
3290 pub url: String,
3291 #[doc = "Loader identifier. Even though it is present in case of same-document\n navigation, the previously committed loaderId would not change unless\n the navigation changes from a same-document to a cross-document\n navigation."]
3292 pub loader_id: super::super::network::LoaderId,
3293 pub navigation_type: super::FrameStartedNavigatingNavigationTypeOption,
3294 }
3295 #[allow(deprecated)]
3296 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3297 pub struct FrameRequestedNavigationEvent {
3298 pub params: FrameRequestedNavigationEventParams,
3299 }
3300 #[allow(deprecated)]
3301 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3302 #[serde(rename_all = "camelCase")]
3303 pub struct FrameRequestedNavigationEventParams {
3304 #[doc = "Id of the frame that is being navigated."]
3305 pub frame_id: super::FrameId,
3306 #[doc = "The reason for the navigation."]
3307 pub reason: super::ClientNavigationReason,
3308 #[serde(default)]
3309 #[doc = "The destination URL for the requested navigation."]
3310 pub url: String,
3311 #[doc = "The disposition for the navigation."]
3312 pub disposition: super::ClientNavigationDisposition,
3313 }
3314 #[allow(deprecated)]
3315 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3316 pub struct FrameScheduledNavigationEvent {
3317 pub params: FrameScheduledNavigationEventParams,
3318 }
3319 #[allow(deprecated)]
3320 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3321 #[serde(rename_all = "camelCase")]
3322 pub struct FrameScheduledNavigationEventParams {
3323 #[doc = "Id of the frame that has scheduled a navigation."]
3324 pub frame_id: super::FrameId,
3325 #[serde(default)]
3326 #[doc = "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not\n guaranteed to start."]
3327 pub delay: JsFloat,
3328 #[doc = "The reason for the navigation."]
3329 pub reason: super::ClientNavigationReason,
3330 #[serde(default)]
3331 #[doc = "The destination URL for the scheduled navigation."]
3332 pub url: String,
3333 }
3334 #[allow(deprecated)]
3335 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3336 pub struct FrameStartedLoadingEvent {
3337 pub params: FrameStartedLoadingEventParams,
3338 }
3339 #[allow(deprecated)]
3340 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3341 #[serde(rename_all = "camelCase")]
3342 pub struct FrameStartedLoadingEventParams {
3343 #[doc = "Id of the frame that has started loading."]
3344 pub frame_id: super::FrameId,
3345 }
3346 #[allow(deprecated)]
3347 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3348 pub struct FrameStoppedLoadingEvent {
3349 pub params: FrameStoppedLoadingEventParams,
3350 }
3351 #[allow(deprecated)]
3352 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3353 #[serde(rename_all = "camelCase")]
3354 pub struct FrameStoppedLoadingEventParams {
3355 #[doc = "Id of the frame that has stopped loading."]
3356 pub frame_id: super::FrameId,
3357 }
3358 #[allow(deprecated)]
3359 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3360 pub struct DownloadWillBeginEvent {
3361 pub params: DownloadWillBeginEventParams,
3362 }
3363 #[allow(deprecated)]
3364 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3365 #[serde(rename_all = "camelCase")]
3366 pub struct DownloadWillBeginEventParams {
3367 #[doc = "Id of the frame that caused download to begin."]
3368 pub frame_id: super::FrameId,
3369 #[serde(default)]
3370 #[doc = "Global unique identifier of the download."]
3371 pub guid: String,
3372 #[serde(default)]
3373 #[doc = "URL of the resource being downloaded."]
3374 pub url: String,
3375 #[serde(default)]
3376 #[doc = "Suggested file name of the resource (the actual name of the file saved on disk may differ)."]
3377 pub suggested_filename: String,
3378 }
3379 #[allow(deprecated)]
3380 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3381 pub struct DownloadProgressEvent {
3382 pub params: DownloadProgressEventParams,
3383 }
3384 #[allow(deprecated)]
3385 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3386 #[serde(rename_all = "camelCase")]
3387 pub struct DownloadProgressEventParams {
3388 #[serde(default)]
3389 #[doc = "Global unique identifier of the download."]
3390 pub guid: String,
3391 #[serde(default)]
3392 #[doc = "Total expected bytes to download."]
3393 pub total_bytes: JsFloat,
3394 #[serde(default)]
3395 #[doc = "Total bytes received."]
3396 pub received_bytes: JsFloat,
3397 #[doc = "Download status."]
3398 pub state: super::DownloadProgressStateOption,
3399 }
3400 #[allow(deprecated)]
3401 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3402 pub struct InterstitialHiddenEvent(pub Option<Json>);
3403 #[allow(deprecated)]
3404 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3405 pub struct InterstitialShownEvent(pub Option<Json>);
3406 #[allow(deprecated)]
3407 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3408 pub struct JavascriptDialogClosedEvent {
3409 pub params: JavascriptDialogClosedEventParams,
3410 }
3411 #[allow(deprecated)]
3412 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3413 #[serde(rename_all = "camelCase")]
3414 pub struct JavascriptDialogClosedEventParams {
3415 #[doc = "Frame id."]
3416 pub frame_id: super::FrameId,
3417 #[serde(default)]
3418 #[doc = "Whether dialog was confirmed."]
3419 pub result: bool,
3420 #[serde(default)]
3421 #[doc = "User input in case of prompt."]
3422 pub user_input: String,
3423 }
3424 #[allow(deprecated)]
3425 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3426 pub struct JavascriptDialogOpeningEvent {
3427 pub params: JavascriptDialogOpeningEventParams,
3428 }
3429 #[allow(deprecated)]
3430 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3431 #[serde(rename_all = "camelCase")]
3432 pub struct JavascriptDialogOpeningEventParams {
3433 #[serde(default)]
3434 #[doc = "Frame url."]
3435 pub url: String,
3436 #[doc = "Frame id."]
3437 pub frame_id: super::FrameId,
3438 #[serde(default)]
3439 #[doc = "Message that will be displayed by the dialog."]
3440 pub message: String,
3441 #[doc = "Dialog type."]
3442 pub r#type: super::DialogType,
3443 #[serde(default)]
3444 #[doc = "True iff browser is capable showing or acting on the given dialog. When browser has no\n dialog handler for given target, calling alert while Page domain is engaged will stall\n the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog."]
3445 pub has_browser_handler: bool,
3446 #[builder(default)]
3447 #[serde(skip_serializing_if = "Option::is_none")]
3448 #[serde(default)]
3449 #[doc = "Default dialog prompt."]
3450 pub default_prompt: Option<String>,
3451 }
3452 #[allow(deprecated)]
3453 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3454 pub struct LifecycleEventEvent {
3455 pub params: LifecycleEventEventParams,
3456 }
3457 #[allow(deprecated)]
3458 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3459 #[serde(rename_all = "camelCase")]
3460 pub struct LifecycleEventEventParams {
3461 #[doc = "Id of the frame."]
3462 pub frame_id: super::FrameId,
3463 #[doc = "Loader identifier. Empty string if the request is fetched from worker."]
3464 pub loader_id: super::super::network::LoaderId,
3465 #[serde(default)]
3466 pub name: String,
3467 pub timestamp: super::super::network::MonotonicTime,
3468 }
3469 #[allow(deprecated)]
3470 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3471 pub struct BackForwardCacheNotUsedEvent {
3472 pub params: BackForwardCacheNotUsedEventParams,
3473 }
3474 #[allow(deprecated)]
3475 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3476 #[serde(rename_all = "camelCase")]
3477 pub struct BackForwardCacheNotUsedEventParams {
3478 #[doc = "The loader id for the associated navigation."]
3479 pub loader_id: super::super::network::LoaderId,
3480 #[doc = "The frame id of the associated frame."]
3481 pub frame_id: super::FrameId,
3482 #[doc = "Array of reasons why the page could not be cached. This must not be empty."]
3483 pub not_restored_explanations: Vec<super::BackForwardCacheNotRestoredExplanation>,
3484 #[builder(default)]
3485 #[serde(skip_serializing_if = "Option::is_none")]
3486 #[doc = "Tree structure of reasons why the page could not be cached for each frame."]
3487 pub not_restored_explanations_tree:
3488 Option<super::BackForwardCacheNotRestoredExplanationTree>,
3489 }
3490 #[allow(deprecated)]
3491 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3492 pub struct LoadEventFiredEvent {
3493 pub params: LoadEventFiredEventParams,
3494 }
3495 #[allow(deprecated)]
3496 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3497 #[serde(rename_all = "camelCase")]
3498 pub struct LoadEventFiredEventParams {
3499 pub timestamp: super::super::network::MonotonicTime,
3500 }
3501 #[allow(deprecated)]
3502 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3503 pub struct NavigatedWithinDocumentEvent {
3504 pub params: NavigatedWithinDocumentEventParams,
3505 }
3506 #[allow(deprecated)]
3507 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3508 #[serde(rename_all = "camelCase")]
3509 pub struct NavigatedWithinDocumentEventParams {
3510 #[doc = "Id of the frame."]
3511 pub frame_id: super::FrameId,
3512 #[serde(default)]
3513 #[doc = "Frame's new url."]
3514 pub url: String,
3515 #[doc = "Navigation type"]
3516 pub navigation_type: super::NavigatedWithinDocumentNavigationTypeOption,
3517 }
3518 #[allow(deprecated)]
3519 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3520 pub struct ScreencastFrameEvent {
3521 pub params: ScreencastFrameEventParams,
3522 }
3523 #[allow(deprecated)]
3524 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3525 #[serde(rename_all = "camelCase")]
3526 pub struct ScreencastFrameEventParams {
3527 #[serde(default)]
3528 #[doc = "Base64-encoded compressed image."]
3529 pub data: String,
3530 #[doc = "Screencast frame metadata."]
3531 pub metadata: super::ScreencastFrameMetadata,
3532 #[serde(default)]
3533 #[doc = "Frame number."]
3534 pub session_id: JsUInt,
3535 }
3536 #[allow(deprecated)]
3537 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3538 pub struct ScreencastVisibilityChangedEvent {
3539 pub params: ScreencastVisibilityChangedEventParams,
3540 }
3541 #[allow(deprecated)]
3542 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3543 #[serde(rename_all = "camelCase")]
3544 pub struct ScreencastVisibilityChangedEventParams {
3545 #[serde(default)]
3546 #[doc = "True if the page is visible."]
3547 pub visible: bool,
3548 }
3549 #[allow(deprecated)]
3550 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3551 pub struct WindowOpenEvent {
3552 pub params: WindowOpenEventParams,
3553 }
3554 #[allow(deprecated)]
3555 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3556 #[serde(rename_all = "camelCase")]
3557 pub struct WindowOpenEventParams {
3558 #[serde(default)]
3559 #[doc = "The URL for the new window."]
3560 pub url: String,
3561 #[serde(default)]
3562 #[doc = "Window name."]
3563 pub window_name: String,
3564 #[serde(default)]
3565 #[doc = "An array of enabled window features."]
3566 pub window_features: Vec<String>,
3567 #[serde(default)]
3568 #[doc = "Whether or not it was triggered by user gesture."]
3569 pub user_gesture: bool,
3570 }
3571 #[allow(deprecated)]
3572 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
3573 pub struct CompilationCacheProducedEvent {
3574 pub params: CompilationCacheProducedEventParams,
3575 }
3576 #[allow(deprecated)]
3577 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
3578 #[serde(rename_all = "camelCase")]
3579 pub struct CompilationCacheProducedEventParams {
3580 #[serde(default)]
3581 pub url: String,
3582 #[serde(default)]
3583 #[doc = "Base64-encoded data"]
3584 pub data: String,
3585 }
3586}