1use serde::{Deserialize, Serialize};
12
13pub type FrameId = String;
15
16#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
20pub enum AdFrameType {
21 #[serde(rename = "none")]
23 None,
24 #[serde(rename = "child")]
26 Child,
27 #[serde(rename = "root")]
29 Root,
30 #[serde(untagged)]
34 Unrecognized(String),
35}
36
37#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
39pub enum AdFrameExplanation {
40 ParentIsAd,
42 CreatedByAdScript,
44 MatchedBlockingRule,
46 #[serde(untagged)]
50 Unrecognized(String),
51}
52
53#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
57pub struct AdFrameStatus {
58 #[serde(rename = "adFrameType")]
59 pub ad_frame_type: AdFrameType,
60 #[serde(default, skip_serializing_if = "Option::is_none")]
61 pub explanations: Option<Vec<AdFrameExplanation>>,
62}
63
64#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
68pub enum SecureContextType {
69 Secure,
71 SecureLocalhost,
73 InsecureScheme,
75 InsecureAncestor,
77 #[serde(untagged)]
81 Unrecognized(String),
82}
83
84#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
89pub enum CrossOriginIsolatedContextType {
90 Isolated,
92 NotIsolated,
94 NotIsolatedFeatureDisabled,
96 #[serde(untagged)]
100 Unrecognized(String),
101}
102
103#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
105pub enum GatedApiFeatures {
106 SharedArrayBuffers,
108 SharedArrayBuffersTransferAllowed,
110 PerformanceMeasureMemory,
112 PerformanceProfile,
114 #[serde(untagged)]
118 Unrecognized(String),
119}
120
121#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
127pub enum PermissionsPolicyFeature {
128 #[serde(rename = "accelerometer")]
130 Accelerometer,
131 #[serde(rename = "all-screens-capture")]
133 AllScreensCapture,
134 #[serde(rename = "ambient-light-sensor")]
136 AmbientLightSensor,
137 #[serde(rename = "aria-notify")]
139 AriaNotify,
140 #[serde(rename = "autofill")]
142 Autofill,
143 #[serde(rename = "autoplay")]
145 Autoplay,
146 #[serde(rename = "bluetooth")]
148 Bluetooth,
149 #[serde(rename = "camera")]
151 Camera,
152 #[serde(rename = "captured-surface-control")]
154 CapturedSurfaceControl,
155 #[serde(rename = "ch-dpr")]
157 ChDpr,
158 #[serde(rename = "ch-device-memory")]
160 ChDeviceMemory,
161 #[serde(rename = "ch-downlink")]
163 ChDownlink,
164 #[serde(rename = "ch-ect")]
166 ChEct,
167 #[serde(rename = "ch-prefers-color-scheme")]
169 ChPrefersColorScheme,
170 #[serde(rename = "ch-prefers-reduced-motion")]
172 ChPrefersReducedMotion,
173 #[serde(rename = "ch-prefers-reduced-transparency")]
175 ChPrefersReducedTransparency,
176 #[serde(rename = "ch-rtt")]
178 ChRtt,
179 #[serde(rename = "ch-save-data")]
181 ChSaveData,
182 #[serde(rename = "ch-ua")]
184 ChUa,
185 #[serde(rename = "ch-ua-arch")]
187 ChUaArch,
188 #[serde(rename = "ch-ua-bitness")]
190 ChUaBitness,
191 #[serde(rename = "ch-ua-high-entropy-values")]
193 ChUaHighEntropyValues,
194 #[serde(rename = "ch-ua-platform")]
196 ChUaPlatform,
197 #[serde(rename = "ch-ua-model")]
199 ChUaModel,
200 #[serde(rename = "ch-ua-mobile")]
202 ChUaMobile,
203 #[serde(rename = "ch-ua-form-factors")]
205 ChUaFormFactors,
206 #[serde(rename = "ch-ua-full-version")]
208 ChUaFullVersion,
209 #[serde(rename = "ch-ua-full-version-list")]
211 ChUaFullVersionList,
212 #[serde(rename = "ch-ua-platform-version")]
214 ChUaPlatformVersion,
215 #[serde(rename = "ch-ua-wow64")]
217 ChUaWow64,
218 #[serde(rename = "ch-viewport-height")]
220 ChViewportHeight,
221 #[serde(rename = "ch-viewport-width")]
223 ChViewportWidth,
224 #[serde(rename = "ch-width")]
226 ChWidth,
227 #[serde(rename = "clipboard-read")]
229 ClipboardRead,
230 #[serde(rename = "clipboard-write")]
232 ClipboardWrite,
233 #[serde(rename = "compute-pressure")]
235 ComputePressure,
236 #[serde(rename = "controlled-frame")]
238 ControlledFrame,
239 #[serde(rename = "cross-origin-isolated")]
241 CrossOriginIsolated,
242 #[serde(rename = "deferred-fetch")]
244 DeferredFetch,
245 #[serde(rename = "deferred-fetch-minimal")]
247 DeferredFetchMinimal,
248 #[serde(rename = "device-attributes")]
250 DeviceAttributes,
251 #[serde(rename = "digital-credentials-create")]
253 DigitalCredentialsCreate,
254 #[serde(rename = "digital-credentials-get")]
256 DigitalCredentialsGet,
257 #[serde(rename = "direct-sockets")]
259 DirectSockets,
260 #[serde(rename = "direct-sockets-multicast")]
262 DirectSocketsMulticast,
263 #[serde(rename = "display-capture")]
265 DisplayCapture,
266 #[serde(rename = "document-domain")]
268 DocumentDomain,
269 #[serde(rename = "encrypted-media")]
271 EncryptedMedia,
272 #[serde(rename = "execution-while-out-of-viewport")]
274 ExecutionWhileOutOfViewport,
275 #[serde(rename = "execution-while-not-rendered")]
277 ExecutionWhileNotRendered,
278 #[serde(rename = "focus-without-user-activation")]
280 FocusWithoutUserActivation,
281 #[serde(rename = "fullscreen")]
283 Fullscreen,
284 #[serde(rename = "frobulate")]
286 Frobulate,
287 #[serde(rename = "gamepad")]
289 Gamepad,
290 #[serde(rename = "geolocation")]
292 Geolocation,
293 #[serde(rename = "gyroscope")]
295 Gyroscope,
296 #[serde(rename = "haptics")]
298 Haptics,
299 #[serde(rename = "hid")]
301 Hid,
302 #[serde(rename = "identity-credentials-get")]
304 IdentityCredentialsGet,
305 #[serde(rename = "idle-detection")]
307 IdleDetection,
308 #[serde(rename = "keyboard-map")]
310 KeyboardMap,
311 #[serde(rename = "language-detector")]
313 LanguageDetector,
314 #[serde(rename = "language-model")]
316 LanguageModel,
317 #[serde(rename = "local-fonts")]
319 LocalFonts,
320 #[serde(rename = "local-network")]
322 LocalNetwork,
323 #[serde(rename = "local-network-access")]
325 LocalNetworkAccess,
326 #[serde(rename = "loopback-network")]
328 LoopbackNetwork,
329 #[serde(rename = "magnetometer")]
331 Magnetometer,
332 #[serde(rename = "manual-text")]
334 ManualText,
335 #[serde(rename = "media-playback-while-not-visible")]
337 MediaPlaybackWhileNotVisible,
338 #[serde(rename = "microphone")]
340 Microphone,
341 #[serde(rename = "midi")]
343 Midi,
344 #[serde(rename = "on-device-speech-recognition")]
346 OnDeviceSpeechRecognition,
347 #[serde(rename = "otp-credentials")]
349 OtpCredentials,
350 #[serde(rename = "payment")]
352 Payment,
353 #[serde(rename = "picture-in-picture")]
355 PictureInPicture,
356 #[serde(rename = "private-state-token-issuance")]
358 PrivateStateTokenIssuance,
359 #[serde(rename = "private-state-token-redemption")]
361 PrivateStateTokenRedemption,
362 #[serde(rename = "publickey-credentials-create")]
364 PublickeyCredentialsCreate,
365 #[serde(rename = "publickey-credentials-get")]
367 PublickeyCredentialsGet,
368 #[serde(rename = "publickey-credentials-remote-client-data-json")]
370 PublickeyCredentialsRemoteClientDataJson,
371 #[serde(rename = "rewriter")]
373 Rewriter,
374 #[serde(rename = "screen-wake-lock")]
376 ScreenWakeLock,
377 #[serde(rename = "semantic-embedder")]
379 SemanticEmbedder,
380 #[serde(rename = "serial")]
382 Serial,
383 #[serde(rename = "smart-card")]
385 SmartCard,
386 #[serde(rename = "speaker-selection")]
388 SpeakerSelection,
389 #[serde(rename = "storage-access")]
391 StorageAccess,
392 #[serde(rename = "sub-apps")]
394 SubApps,
395 #[serde(rename = "summarizer")]
397 Summarizer,
398 #[serde(rename = "sync-xhr")]
400 SyncXhr,
401 #[serde(rename = "tools")]
403 Tools,
404 #[serde(rename = "translator")]
406 Translator,
407 #[serde(rename = "unbounded-element")]
409 UnboundedElement,
410 #[serde(rename = "unload")]
412 Unload,
413 #[serde(rename = "usb")]
415 Usb,
416 #[serde(rename = "usb-unrestricted")]
418 UsbUnrestricted,
419 #[serde(rename = "vertical-scroll")]
421 VerticalScroll,
422 #[serde(rename = "web-app-installation")]
424 WebAppInstallation,
425 #[serde(rename = "webnn")]
427 Webnn,
428 #[serde(rename = "web-printing")]
430 WebPrinting,
431 #[serde(rename = "web-share")]
433 WebShare,
434 #[serde(rename = "window-management")]
436 WindowManagement,
437 #[serde(rename = "writer")]
439 Writer,
440 #[serde(rename = "xr-spatial-tracking")]
442 XrSpatialTracking,
443 #[serde(untagged)]
447 Unrecognized(String),
448}
449
450#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
454pub enum PermissionsPolicyBlockReason {
455 Header,
457 IframeAttribute,
459 InFencedFrameTree,
461 InIsolatedApp,
463 #[serde(untagged)]
467 Unrecognized(String),
468}
469
470#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
472pub struct PermissionsPolicyBlockLocator {
473 #[serde(rename = "frameId")]
474 pub frame_id: FrameId,
475 #[serde(rename = "blockReason")]
476 pub block_reason: PermissionsPolicyBlockReason,
477}
478
479#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
481pub struct PermissionsPolicyFeatureState {
482 pub feature: PermissionsPolicyFeature,
483 pub allowed: bool,
484 #[serde(default, skip_serializing_if = "Option::is_none")]
485 pub locator: Option<PermissionsPolicyBlockLocator>,
486}
487
488#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
493pub enum OriginTrialTokenStatus {
494 Success,
496 NotSupported,
498 Insecure,
500 Expired,
502 WrongOrigin,
504 InvalidSignature,
506 Malformed,
508 WrongVersion,
510 FeatureDisabled,
512 TokenDisabled,
514 FeatureDisabledForUser,
516 UnknownTrial,
518 #[serde(untagged)]
522 Unrecognized(String),
523}
524
525#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
529pub enum OriginTrialStatus {
530 Enabled,
532 ValidTokenNotProvided,
534 #[serde(rename = "OSNotSupported")]
536 OsNotSupported,
537 TrialNotAllowed,
539 #[serde(untagged)]
543 Unrecognized(String),
544}
545
546#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
548pub enum OriginTrialUsageRestriction {
549 None,
551 Subset,
553 #[serde(untagged)]
557 Unrecognized(String),
558}
559
560#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
562pub struct OriginTrialToken {
563 pub origin: String,
564 #[serde(rename = "matchSubDomains")]
565 pub match_sub_domains: bool,
566 #[serde(rename = "trialName")]
567 pub trial_name: String,
568 #[serde(rename = "expiryTime")]
569 pub expiry_time: crate::protocol::network::TimeSinceEpoch,
570 #[serde(rename = "isThirdParty")]
571 pub is_third_party: bool,
572 #[serde(rename = "usageRestriction")]
573 pub usage_restriction: OriginTrialUsageRestriction,
574}
575
576#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
578pub struct OriginTrialTokenWithStatus {
579 #[serde(rename = "rawTokenText")]
580 pub raw_token_text: String,
581 #[serde(
583 rename = "parsedToken",
584 default,
585 skip_serializing_if = "Option::is_none"
586 )]
587 pub parsed_token: Option<OriginTrialToken>,
588 pub status: OriginTrialTokenStatus,
589}
590
591#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
593pub struct OriginTrial {
594 #[serde(rename = "trialName")]
595 pub trial_name: String,
596 pub status: OriginTrialStatus,
597 #[serde(rename = "tokensWithStatus")]
598 pub tokens_with_status: Vec<OriginTrialTokenWithStatus>,
599}
600
601#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
605pub struct SecurityOriginDetails {
606 #[serde(rename = "isLocalhost")]
610 pub is_localhost: bool,
611}
612
613#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
615pub struct Frame {
616 pub id: FrameId,
618 #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
620 pub parent_id: Option<FrameId>,
621 #[serde(rename = "loaderId")]
623 pub loader_id: crate::protocol::network::LoaderId,
624 #[serde(default, skip_serializing_if = "Option::is_none")]
626 pub name: Option<String>,
627 pub url: String,
629 #[serde(
633 rename = "urlFragment",
634 default,
635 skip_serializing_if = "Option::is_none"
636 )]
637 pub url_fragment: Option<String>,
638 #[serde(rename = "domainAndRegistry")]
645 pub domain_and_registry: String,
646 #[serde(rename = "securityOrigin")]
648 pub security_origin: String,
649 #[serde(
653 rename = "securityOriginDetails",
654 default,
655 skip_serializing_if = "Option::is_none"
656 )]
657 pub security_origin_details: Option<SecurityOriginDetails>,
658 #[serde(rename = "mimeType")]
660 pub mime_type: String,
661 #[serde(
666 rename = "unreachableUrl",
667 default,
668 skip_serializing_if = "Option::is_none"
669 )]
670 pub unreachable_url: Option<String>,
671 #[serde(
675 rename = "adFrameStatus",
676 default,
677 skip_serializing_if = "Option::is_none"
678 )]
679 pub ad_frame_status: Option<AdFrameStatus>,
680 #[serde(rename = "secureContextType")]
685 pub secure_context_type: SecureContextType,
686 #[serde(rename = "crossOriginIsolatedContextType")]
690 pub cross_origin_isolated_context_type: CrossOriginIsolatedContextType,
691 #[serde(rename = "gatedAPIFeatures")]
695 pub gated_api_features: Vec<GatedApiFeatures>,
696}
697
698#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
702pub struct FrameResource {
703 pub url: String,
705 pub r#type: crate::protocol::network::ResourceType,
707 #[serde(rename = "mimeType")]
709 pub mime_type: String,
710 #[serde(
712 rename = "lastModified",
713 default,
714 skip_serializing_if = "Option::is_none"
715 )]
716 pub last_modified: Option<crate::protocol::network::TimeSinceEpoch>,
717 #[serde(
719 rename = "contentSize",
720 default,
721 skip_serializing_if = "Option::is_none"
722 )]
723 pub content_size: Option<f64>,
724 #[serde(default, skip_serializing_if = "Option::is_none")]
726 pub failed: Option<bool>,
727 #[serde(default, skip_serializing_if = "Option::is_none")]
729 pub canceled: Option<bool>,
730}
731
732#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
736pub struct FrameResourceTree {
737 pub frame: Frame,
739 #[serde(
741 rename = "childFrames",
742 default,
743 skip_serializing_if = "Option::is_none"
744 )]
745 pub child_frames: Option<Vec<FrameResourceTree>>,
746 pub resources: Vec<FrameResource>,
748}
749
750#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
752pub struct FrameTree {
753 pub frame: Frame,
755 #[serde(
757 rename = "childFrames",
758 default,
759 skip_serializing_if = "Option::is_none"
760 )]
761 pub child_frames: Option<Vec<FrameTree>>,
762}
763
764pub type ScriptIdentifier = String;
766
767#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
769pub enum TransitionType {
770 #[serde(rename = "link")]
772 Link,
773 #[serde(rename = "typed")]
775 Typed,
776 #[serde(rename = "address_bar")]
778 AddressBar,
779 #[serde(rename = "auto_bookmark")]
781 AutoBookmark,
782 #[serde(rename = "auto_subframe")]
784 AutoSubframe,
785 #[serde(rename = "manual_subframe")]
787 ManualSubframe,
788 #[serde(rename = "generated")]
790 Generated,
791 #[serde(rename = "auto_toplevel")]
793 AutoToplevel,
794 #[serde(rename = "form_submit")]
796 FormSubmit,
797 #[serde(rename = "reload")]
799 Reload,
800 #[serde(rename = "keyword")]
802 Keyword,
803 #[serde(rename = "keyword_generated")]
805 KeywordGenerated,
806 #[serde(rename = "other")]
808 Other,
809 #[serde(untagged)]
813 Unrecognized(String),
814}
815
816#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
818pub struct NavigationEntry {
819 pub id: i64,
821 pub url: String,
823 #[serde(rename = "userTypedURL")]
825 pub user_typed_url: String,
826 pub title: String,
828 #[serde(rename = "transitionType")]
830 pub transition_type: TransitionType,
831}
832
833#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
837pub struct ScreencastFrameMetadata {
838 #[serde(rename = "offsetTop")]
840 pub offset_top: f64,
841 #[serde(rename = "pageScaleFactor")]
843 pub page_scale_factor: f64,
844 #[serde(rename = "deviceWidth")]
846 pub device_width: f64,
847 #[serde(rename = "deviceHeight")]
849 pub device_height: f64,
850 #[serde(rename = "scrollOffsetX")]
852 pub scroll_offset_x: f64,
853 #[serde(rename = "scrollOffsetY")]
855 pub scroll_offset_y: f64,
856 #[serde(default, skip_serializing_if = "Option::is_none")]
858 pub timestamp: Option<crate::protocol::network::TimeSinceEpoch>,
859 #[serde(
861 rename = "monotonicTimestamp",
862 default,
863 skip_serializing_if = "Option::is_none"
864 )]
865 pub monotonic_timestamp: Option<crate::protocol::network::MonotonicTime>,
866}
867
868#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
870pub enum DialogType {
871 #[serde(rename = "alert")]
873 Alert,
874 #[serde(rename = "confirm")]
876 Confirm,
877 #[serde(rename = "prompt")]
879 Prompt,
880 #[serde(rename = "beforeunload")]
882 Beforeunload,
883 #[serde(untagged)]
887 Unrecognized(String),
888}
889
890#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
892pub struct AppManifestError {
893 pub message: String,
895 pub critical: i64,
897 pub line: i64,
899 pub column: i64,
901}
902
903#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
907pub struct AppManifestParsedProperties {
908 pub scope: String,
910}
911
912#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
914pub struct LayoutViewport {
915 #[serde(rename = "pageX")]
917 pub page_x: i64,
918 #[serde(rename = "pageY")]
920 pub page_y: i64,
921 #[serde(rename = "clientWidth")]
923 pub client_width: i64,
924 #[serde(rename = "clientHeight")]
926 pub client_height: i64,
927}
928
929#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
931pub struct VisualViewport {
932 #[serde(rename = "offsetX")]
934 pub offset_x: f64,
935 #[serde(rename = "offsetY")]
937 pub offset_y: f64,
938 #[serde(rename = "pageX")]
940 pub page_x: f64,
941 #[serde(rename = "pageY")]
943 pub page_y: f64,
944 #[serde(rename = "clientWidth")]
946 pub client_width: f64,
947 #[serde(rename = "clientHeight")]
949 pub client_height: f64,
950 pub scale: f64,
952 #[serde(default, skip_serializing_if = "Option::is_none")]
954 pub zoom: Option<f64>,
955}
956
957#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
959pub struct Viewport {
960 pub x: f64,
962 pub y: f64,
964 pub width: f64,
966 pub height: f64,
968 pub scale: f64,
970}
971
972#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
976pub struct FontFamilies {
977 #[serde(default, skip_serializing_if = "Option::is_none")]
979 pub standard: Option<String>,
980 #[serde(default, skip_serializing_if = "Option::is_none")]
982 pub fixed: Option<String>,
983 #[serde(default, skip_serializing_if = "Option::is_none")]
985 pub serif: Option<String>,
986 #[serde(rename = "sansSerif", default, skip_serializing_if = "Option::is_none")]
988 pub sans_serif: Option<String>,
989 #[serde(default, skip_serializing_if = "Option::is_none")]
991 pub cursive: Option<String>,
992 #[serde(default, skip_serializing_if = "Option::is_none")]
994 pub fantasy: Option<String>,
995 #[serde(default, skip_serializing_if = "Option::is_none")]
997 pub math: Option<String>,
998}
999
1000#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1004pub struct ScriptFontFamilies {
1005 pub script: String,
1007 #[serde(rename = "fontFamilies")]
1009 pub font_families: FontFamilies,
1010}
1011
1012#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1016pub struct FontSizes {
1017 #[serde(default, skip_serializing_if = "Option::is_none")]
1019 pub standard: Option<i64>,
1020 #[serde(default, skip_serializing_if = "Option::is_none")]
1022 pub fixed: Option<i64>,
1023}
1024
1025#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1027pub enum ClientNavigationReason {
1028 #[serde(rename = "anchorClick")]
1030 AnchorClick,
1031 #[serde(rename = "formSubmissionGet")]
1033 FormSubmissionGet,
1034 #[serde(rename = "formSubmissionPost")]
1036 FormSubmissionPost,
1037 #[serde(rename = "httpHeaderRefresh")]
1039 HttpHeaderRefresh,
1040 #[serde(rename = "initialFrameNavigation")]
1042 InitialFrameNavigation,
1043 #[serde(rename = "metaTagRefresh")]
1045 MetaTagRefresh,
1046 #[serde(rename = "other")]
1048 Other,
1049 #[serde(rename = "pageBlockInterstitial")]
1051 PageBlockInterstitial,
1052 #[serde(rename = "reload")]
1054 Reload,
1055 #[serde(rename = "scriptInitiated")]
1057 ScriptInitiated,
1058 #[serde(untagged)]
1062 Unrecognized(String),
1063}
1064
1065#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1067pub enum ClientNavigationDisposition {
1068 #[serde(rename = "currentTab")]
1070 CurrentTab,
1071 #[serde(rename = "newTab")]
1073 NewTab,
1074 #[serde(rename = "newWindow")]
1076 NewWindow,
1077 #[serde(rename = "download")]
1079 Download,
1080 #[serde(untagged)]
1084 Unrecognized(String),
1085}
1086
1087#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1089pub struct InstallabilityErrorArgument {
1090 pub name: String,
1092 pub value: String,
1094}
1095
1096#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1100pub struct InstallabilityError {
1101 #[serde(rename = "errorId")]
1103 pub error_id: String,
1104 #[serde(rename = "errorArguments")]
1107 pub error_arguments: Vec<InstallabilityErrorArgument>,
1108}
1109
1110#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1114pub enum ReferrerPolicy {
1115 #[serde(rename = "noReferrer")]
1117 NoReferrer,
1118 #[serde(rename = "noReferrerWhenDowngrade")]
1120 NoReferrerWhenDowngrade,
1121 #[serde(rename = "origin")]
1123 Origin,
1124 #[serde(rename = "originWhenCrossOrigin")]
1126 OriginWhenCrossOrigin,
1127 #[serde(rename = "sameOrigin")]
1129 SameOrigin,
1130 #[serde(rename = "strictOrigin")]
1132 StrictOrigin,
1133 #[serde(rename = "strictOriginWhenCrossOrigin")]
1135 StrictOriginWhenCrossOrigin,
1136 #[serde(rename = "unsafeUrl")]
1138 UnsafeUrl,
1139 #[serde(untagged)]
1143 Unrecognized(String),
1144}
1145
1146#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1150pub struct CompilationCacheParams {
1151 pub url: String,
1153 #[serde(default, skip_serializing_if = "Option::is_none")]
1156 pub eager: Option<bool>,
1157}
1158
1159#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1161pub struct FileFilter {
1162 #[serde(default, skip_serializing_if = "Option::is_none")]
1163 pub name: Option<String>,
1164 #[serde(default, skip_serializing_if = "Option::is_none")]
1165 pub accepts: Option<Vec<String>>,
1166}
1167
1168#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1170pub struct FileHandler {
1171 pub action: String,
1172 pub name: String,
1173 #[serde(default, skip_serializing_if = "Option::is_none")]
1175 pub accepts: Option<Vec<FileFilter>>,
1176 #[serde(rename = "launchType")]
1179 pub launch_type: String,
1180}
1181
1182#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1186pub struct ImageResource {
1187 pub url: String,
1190 #[serde(default, skip_serializing_if = "Option::is_none")]
1191 pub sizes: Option<String>,
1192 #[serde(default, skip_serializing_if = "Option::is_none")]
1193 pub r#type: Option<String>,
1194}
1195
1196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1198pub struct LaunchHandler {
1199 #[serde(rename = "clientMode")]
1200 pub client_mode: String,
1201}
1202
1203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1205pub struct ProtocolHandler {
1206 pub protocol: String,
1207 pub url: String,
1208}
1209
1210#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1212pub struct RelatedApplication {
1213 #[serde(default, skip_serializing_if = "Option::is_none")]
1214 pub id: Option<String>,
1215 pub url: String,
1216}
1217
1218#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1220pub struct ScopeExtension {
1221 pub origin: String,
1224 #[serde(rename = "hasOriginWildcard")]
1225 pub has_origin_wildcard: bool,
1226}
1227
1228#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1230pub struct Screenshot {
1231 pub image: ImageResource,
1232 #[serde(rename = "formFactor")]
1233 pub form_factor: String,
1234 #[serde(default, skip_serializing_if = "Option::is_none")]
1235 pub label: Option<String>,
1236}
1237
1238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1240pub struct ShareTarget {
1241 pub action: String,
1242 pub method: String,
1243 pub enctype: String,
1244 #[serde(default, skip_serializing_if = "Option::is_none")]
1246 pub title: Option<String>,
1247 #[serde(default, skip_serializing_if = "Option::is_none")]
1248 pub text: Option<String>,
1249 #[serde(default, skip_serializing_if = "Option::is_none")]
1250 pub url: Option<String>,
1251 #[serde(default, skip_serializing_if = "Option::is_none")]
1252 pub files: Option<Vec<FileFilter>>,
1253}
1254
1255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1257pub struct Shortcut {
1258 pub name: String,
1259 pub url: String,
1260}
1261
1262#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1264pub struct WebAppManifest {
1265 #[serde(
1266 rename = "backgroundColor",
1267 default,
1268 skip_serializing_if = "Option::is_none"
1269 )]
1270 pub background_color: Option<String>,
1271 #[serde(default, skip_serializing_if = "Option::is_none")]
1273 pub description: Option<String>,
1274 #[serde(default, skip_serializing_if = "Option::is_none")]
1275 pub dir: Option<String>,
1276 #[serde(default, skip_serializing_if = "Option::is_none")]
1277 pub display: Option<String>,
1278 #[serde(
1280 rename = "displayOverrides",
1281 default,
1282 skip_serializing_if = "Option::is_none"
1283 )]
1284 pub display_overrides: Option<Vec<String>>,
1285 #[serde(
1287 rename = "fileHandlers",
1288 default,
1289 skip_serializing_if = "Option::is_none"
1290 )]
1291 pub file_handlers: Option<Vec<FileHandler>>,
1292 #[serde(default, skip_serializing_if = "Option::is_none")]
1293 pub icons: Option<Vec<ImageResource>>,
1294 #[serde(default, skip_serializing_if = "Option::is_none")]
1295 pub id: Option<String>,
1296 #[serde(default, skip_serializing_if = "Option::is_none")]
1297 pub lang: Option<String>,
1298 #[serde(
1302 rename = "launchHandler",
1303 default,
1304 skip_serializing_if = "Option::is_none"
1305 )]
1306 pub launch_handler: Option<LaunchHandler>,
1307 #[serde(default, skip_serializing_if = "Option::is_none")]
1308 pub name: Option<String>,
1309 #[serde(default, skip_serializing_if = "Option::is_none")]
1310 pub orientation: Option<String>,
1311 #[serde(
1312 rename = "preferRelatedApplications",
1313 default,
1314 skip_serializing_if = "Option::is_none"
1315 )]
1316 pub prefer_related_applications: Option<bool>,
1317 #[serde(
1319 rename = "protocolHandlers",
1320 default,
1321 skip_serializing_if = "Option::is_none"
1322 )]
1323 pub protocol_handlers: Option<Vec<ProtocolHandler>>,
1324 #[serde(
1325 rename = "relatedApplications",
1326 default,
1327 skip_serializing_if = "Option::is_none"
1328 )]
1329 pub related_applications: Option<Vec<RelatedApplication>>,
1330 #[serde(default, skip_serializing_if = "Option::is_none")]
1331 pub scope: Option<String>,
1332 #[serde(
1335 rename = "scopeExtensions",
1336 default,
1337 skip_serializing_if = "Option::is_none"
1338 )]
1339 pub scope_extensions: Option<Vec<ScopeExtension>>,
1340 #[serde(default, skip_serializing_if = "Option::is_none")]
1342 pub screenshots: Option<Vec<Screenshot>>,
1343 #[serde(
1344 rename = "shareTarget",
1345 default,
1346 skip_serializing_if = "Option::is_none"
1347 )]
1348 pub share_target: Option<ShareTarget>,
1349 #[serde(rename = "shortName", default, skip_serializing_if = "Option::is_none")]
1350 pub short_name: Option<String>,
1351 #[serde(default, skip_serializing_if = "Option::is_none")]
1352 pub shortcuts: Option<Vec<Shortcut>>,
1353 #[serde(rename = "startUrl", default, skip_serializing_if = "Option::is_none")]
1354 pub start_url: Option<String>,
1355 #[serde(
1356 rename = "themeColor",
1357 default,
1358 skip_serializing_if = "Option::is_none"
1359 )]
1360 pub theme_color: Option<String>,
1361}
1362
1363#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1364pub struct SubApp {
1365 pub name: String,
1367 pub scope: String,
1369 #[serde(rename = "manifestId")]
1371 pub manifest_id: String,
1372 #[serde(rename = "startUrl")]
1374 pub start_url: String,
1375}
1376
1377#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1381pub enum NavigationType {
1382 Navigation,
1384 BackForwardCacheRestore,
1386 #[serde(untagged)]
1390 Unrecognized(String),
1391}
1392
1393#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1397pub enum BackForwardCacheNotRestoredReason {
1398 NotPrimaryMainFrame,
1400 BackForwardCacheDisabled,
1402 RelatedActiveContentsExist,
1404 #[serde(rename = "HTTPStatusNotOK")]
1406 HttpStatusNotOk,
1407 #[serde(rename = "SchemeNotHTTPOrHTTPS")]
1409 SchemeNotHttpOrHttps,
1410 Loading,
1412 WasGrantedMediaAccess,
1414 DisableForRenderFrameHostCalled,
1416 DomainNotAllowed,
1418 #[serde(rename = "HTTPMethodNotGET")]
1420 HttpMethodNotGet,
1421 SubframeIsNavigating,
1423 Timeout,
1425 CacheLimit,
1427 JavaScriptExecution,
1429 RendererProcessKilled,
1431 RendererProcessCrashed,
1433 SchedulerTrackedFeatureUsed,
1435 ConflictingBrowsingInstance,
1437 CacheFlushed,
1439 ServiceWorkerVersionActivation,
1441 SessionRestored,
1443 ServiceWorkerPostMessage,
1445 EnteredBackForwardCacheBeforeServiceWorkerHostAdded,
1447 #[serde(rename = "RenderFrameHostReused_SameSite")]
1449 RenderFrameHostReusedSameSite,
1450 #[serde(rename = "RenderFrameHostReused_CrossSite")]
1452 RenderFrameHostReusedCrossSite,
1453 ServiceWorkerClaim,
1455 IgnoreEventAndEvict,
1457 HaveInnerContents,
1459 TimeoutPuttingInCache,
1461 BackForwardCacheDisabledByLowMemory,
1463 BackForwardCacheDisabledByCommandLine,
1465 NetworkRequestDatapipeDrainedAsBytesConsumer,
1467 NetworkRequestRedirected,
1469 NetworkRequestTimeout,
1471 NetworkExceedsBufferLimit,
1473 NavigationCancelledWhileRestoring,
1475 NotMostRecentNavigationEntry,
1477 BackForwardCacheDisabledForPrerender,
1479 UserAgentOverrideDiffers,
1481 ForegroundCacheLimit,
1483 ForwardCacheDisabled,
1485 BrowsingInstanceNotSwapped,
1487 BackForwardCacheDisabledForDelegate,
1489 UnloadHandlerExistsInMainFrame,
1491 UnloadHandlerExistsInSubFrame,
1493 ServiceWorkerUnregistration,
1495 CacheControlNoStore,
1497 CacheControlNoStoreCookieModified,
1499 #[serde(rename = "CacheControlNoStoreHTTPOnlyCookieModified")]
1501 CacheControlNoStoreHttpOnlyCookieModified,
1502 NoResponseHead,
1504 Unknown,
1506 ActivationNavigationsDisallowedForBug1234857,
1508 ErrorDocument,
1510 FencedFramesEmbedder,
1512 CookieDisabled,
1514 #[serde(rename = "HTTPAuthRequired")]
1516 HttpAuthRequired,
1517 CookieFlushed,
1519 BroadcastChannelOnMessage,
1521 WebViewSettingsChanged,
1523 WebViewJavaScriptObjectChanged,
1525 WebViewMessageListenerInjected,
1527 WebViewSafeBrowsingAllowlistChanged,
1529 WebViewDocumentStartJavascriptChanged,
1531 WebSocket,
1533 WebTransport,
1535 #[serde(rename = "WebRTC")]
1537 WebRtc,
1538 MainResourceHasCacheControlNoStore,
1540 MainResourceHasCacheControlNoCache,
1542 SubresourceHasCacheControlNoStore,
1544 SubresourceHasCacheControlNoCache,
1546 ContainsPlugins,
1548 DocumentLoaded,
1550 OutstandingNetworkRequestOthers,
1552 #[serde(rename = "RequestedMIDIPermission")]
1554 RequestedMidiPermission,
1555 RequestedAudioCapturePermission,
1557 RequestedVideoCapturePermission,
1559 RequestedBackForwardCacheBlockedSensors,
1561 RequestedBackgroundWorkPermission,
1563 BroadcastChannel,
1565 #[serde(rename = "WebXR")]
1567 WebXr,
1568 SharedWorker,
1570 SharedWorkerMessage,
1572 SharedWorkerWithNoActiveClient,
1574 WebLocks,
1576 WebLocksContention,
1578 #[serde(rename = "WebHID")]
1580 WebHid,
1581 WebBluetooth,
1583 WebShare,
1585 RequestedStorageAccessGrant,
1587 WebNfc,
1589 OutstandingNetworkRequestFetch,
1591 #[serde(rename = "OutstandingNetworkRequestXHR")]
1593 OutstandingNetworkRequestXhr,
1594 AppBanner,
1596 Printing,
1598 WebDatabase,
1600 PictureInPicture,
1602 SpeechRecognizer,
1604 IdleManager,
1606 PaymentManager,
1608 SpeechSynthesis,
1610 KeyboardLock,
1612 #[serde(rename = "WebOTPService")]
1614 WebOtpService,
1615 OutstandingNetworkRequestDirectSocket,
1617 InjectedJavascript,
1619 InjectedStyleSheet,
1621 KeepaliveRequest,
1623 #[serde(rename = "IndexedDBEvent")]
1625 IndexedDbEvent,
1626 Dummy,
1628 JsNetworkRequestReceivedCacheControlNoStoreResource,
1630 #[serde(rename = "WebRTCUsedWithCCNS")]
1632 WebRtcUsedWithCcns,
1633 #[serde(rename = "WebTransportUsedWithCCNS")]
1635 WebTransportUsedWithCcns,
1636 #[serde(rename = "WebSocketUsedWithCCNS")]
1638 WebSocketUsedWithCcns,
1639 SmartCard,
1641 LiveMediaStreamTrack,
1643 UnloadHandler,
1645 ParserAborted,
1647 ContentSecurityHandler,
1649 #[serde(rename = "ContentWebAuthenticationAPI")]
1651 ContentWebAuthenticationApi,
1652 ContentFileChooser,
1654 ContentSerial,
1656 ContentFileSystemAccess,
1658 ContentMediaDevicesDispatcherHost,
1660 ContentWebBluetooth,
1662 #[serde(rename = "ContentWebUSB")]
1664 ContentWebUsb,
1665 ContentMediaSessionService,
1667 ContentScreenReader,
1669 ContentDiscarded,
1671 EmbedderPopupBlockerTabHelper,
1673 EmbedderSafeBrowsingTriggeredPopupBlocker,
1675 EmbedderSafeBrowsingThreatDetails,
1677 EmbedderAppBannerManager,
1679 EmbedderDomDistillerViewerSource,
1681 EmbedderDomDistillerSelfDeletingRequestDelegate,
1683 EmbedderOomInterventionTabHelper,
1685 EmbedderOfflinePage,
1687 EmbedderChromePasswordManagerClientBindCredentialManager,
1689 EmbedderPermissionRequestManager,
1691 EmbedderModalDialog,
1693 EmbedderExtensions,
1695 EmbedderExtensionMessaging,
1697 EmbedderExtensionMessagingForOpenPort,
1699 EmbedderExtensionSentMessageToCachedFrame,
1701 EmbedderExtensionFrame,
1703 EmbedderPrivilegedWebContents,
1705 RequestedByWebViewClient,
1707 PostMessageByWebViewClient,
1709 CacheControlNoStoreDeviceBoundSessionTerminated,
1711 CacheLimitPrunedOnModerateMemoryPressure,
1713 CacheLimitPrunedOnCriticalMemoryPressure,
1715 #[serde(untagged)]
1719 Unrecognized(String),
1720}
1721
1722#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1726pub enum BackForwardCacheNotRestoredReasonType {
1727 SupportPending,
1729 PageSupportNeeded,
1731 Circumstantial,
1733 #[serde(untagged)]
1737 Unrecognized(String),
1738}
1739
1740#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1742pub struct BackForwardCacheBlockingDetails {
1743 #[serde(default, skip_serializing_if = "Option::is_none")]
1745 pub url: Option<String>,
1746 #[serde(default, skip_serializing_if = "Option::is_none")]
1749 pub function: Option<String>,
1750 #[serde(rename = "lineNumber")]
1752 pub line_number: i64,
1753 #[serde(rename = "columnNumber")]
1755 pub column_number: i64,
1756}
1757
1758#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1760pub struct BackForwardCacheNotRestoredExplanation {
1761 pub r#type: BackForwardCacheNotRestoredReasonType,
1763 pub reason: BackForwardCacheNotRestoredReason,
1765 #[serde(default, skip_serializing_if = "Option::is_none")]
1769 pub context: Option<String>,
1770 #[serde(default, skip_serializing_if = "Option::is_none")]
1771 pub details: Option<Vec<BackForwardCacheBlockingDetails>>,
1772}
1773
1774#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1776pub struct BackForwardCacheNotRestoredExplanationTree {
1777 pub url: String,
1779 pub explanations: Vec<BackForwardCacheNotRestoredExplanation>,
1781 pub children: Vec<BackForwardCacheNotRestoredExplanationTree>,
1783}
1784
1785#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1793pub struct AddScriptToEvaluateOnLoadParams {
1794 #[serde(rename = "scriptSource")]
1795 pub script_source: String,
1796}
1797
1798#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1800pub struct AddScriptToEvaluateOnLoadReturns {
1801 pub identifier: ScriptIdentifier,
1803}
1804
1805impl crate::typed::Command for AddScriptToEvaluateOnLoadParams {
1806 const METHOD: &'static str = "Page.addScriptToEvaluateOnLoad";
1807 type Returns = AddScriptToEvaluateOnLoadReturns;
1808}
1809
1810#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1815pub struct AddScriptToEvaluateOnNewDocumentParams {
1816 pub source: String,
1817 #[serde(rename = "worldName", default, skip_serializing_if = "Option::is_none")]
1823 pub world_name: Option<String>,
1824 #[serde(
1829 rename = "includeCommandLineAPI",
1830 default,
1831 skip_serializing_if = "Option::is_none"
1832 )]
1833 pub include_command_line_api: Option<bool>,
1834 #[serde(
1839 rename = "runImmediately",
1840 default,
1841 skip_serializing_if = "Option::is_none"
1842 )]
1843 pub run_immediately: Option<bool>,
1844}
1845
1846#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1848pub struct AddScriptToEvaluateOnNewDocumentReturns {
1849 pub identifier: ScriptIdentifier,
1851}
1852
1853impl crate::typed::Command for AddScriptToEvaluateOnNewDocumentParams {
1854 const METHOD: &'static str = "Page.addScriptToEvaluateOnNewDocument";
1855 type Returns = AddScriptToEvaluateOnNewDocumentReturns;
1856}
1857
1858#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1862pub struct BringToFrontParams {}
1863
1864impl crate::typed::Command for BringToFrontParams {
1865 const METHOD: &'static str = "Page.bringToFront";
1866 type Returns = crate::typed::NoReturns;
1867}
1868
1869#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1873pub struct CaptureScreenshotParams {
1874 #[serde(default, skip_serializing_if = "Option::is_none")]
1876 pub format: Option<CaptureScreenshotFormat>,
1877 #[serde(default, skip_serializing_if = "Option::is_none")]
1879 pub quality: Option<i64>,
1880 #[serde(default, skip_serializing_if = "Option::is_none")]
1882 pub clip: Option<Viewport>,
1883 #[serde(
1888 rename = "fromSurface",
1889 default,
1890 skip_serializing_if = "Option::is_none"
1891 )]
1892 pub from_surface: Option<bool>,
1893 #[serde(
1897 rename = "captureBeyondViewport",
1898 default,
1899 skip_serializing_if = "Option::is_none"
1900 )]
1901 pub capture_beyond_viewport: Option<bool>,
1902 #[serde(
1907 rename = "optimizeForSpeed",
1908 default,
1909 skip_serializing_if = "Option::is_none"
1910 )]
1911 pub optimize_for_speed: Option<bool>,
1912}
1913
1914#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1916pub enum CaptureScreenshotFormat {
1917 #[serde(rename = "jpeg")]
1919 Jpeg,
1920 #[serde(rename = "png")]
1922 Png,
1923 #[serde(rename = "webp")]
1925 Webp,
1926 #[serde(untagged)]
1930 Unrecognized(String),
1931}
1932
1933#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1935pub struct CaptureScreenshotReturns {
1936 pub data: String,
1939}
1940
1941impl crate::typed::Command for CaptureScreenshotParams {
1942 const METHOD: &'static str = "Page.captureScreenshot";
1943 type Returns = CaptureScreenshotReturns;
1944}
1945
1946#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1954pub struct CaptureSnapshotParams {
1955 #[serde(default, skip_serializing_if = "Option::is_none")]
1957 pub format: Option<CaptureSnapshotFormat>,
1958}
1959
1960#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1962pub enum CaptureSnapshotFormat {
1963 #[serde(rename = "mhtml")]
1965 Mhtml,
1966 #[serde(untagged)]
1970 Unrecognized(String),
1971}
1972
1973#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1975pub struct CaptureSnapshotReturns {
1976 pub data: String,
1978}
1979
1980impl crate::typed::Command for CaptureSnapshotParams {
1981 const METHOD: &'static str = "Page.captureSnapshot";
1982 type Returns = CaptureSnapshotReturns;
1983}
1984
1985#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1993pub struct ClearDeviceMetricsOverrideParams {}
1994
1995impl crate::typed::Command for ClearDeviceMetricsOverrideParams {
1996 const METHOD: &'static str = "Page.clearDeviceMetricsOverride";
1997 type Returns = crate::typed::NoReturns;
1998}
1999
2000#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2008pub struct ClearDeviceOrientationOverrideParams {}
2009
2010impl crate::typed::Command for ClearDeviceOrientationOverrideParams {
2011 const METHOD: &'static str = "Page.clearDeviceOrientationOverride";
2012 type Returns = crate::typed::NoReturns;
2013}
2014
2015#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2021pub struct ClearGeolocationOverrideParams {}
2022
2023impl crate::typed::Command for ClearGeolocationOverrideParams {
2024 const METHOD: &'static str = "Page.clearGeolocationOverride";
2025 type Returns = crate::typed::NoReturns;
2026}
2027
2028#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2032pub struct CreateIsolatedWorldParams {
2033 #[serde(rename = "frameId")]
2035 pub frame_id: FrameId,
2036 #[serde(rename = "worldName", default, skip_serializing_if = "Option::is_none")]
2038 pub world_name: Option<String>,
2039 #[serde(
2042 rename = "grantUniveralAccess",
2043 default,
2044 skip_serializing_if = "Option::is_none"
2045 )]
2046 pub grant_univeral_access: Option<bool>,
2047 #[serde(
2054 rename = "contentSecurityPolicy",
2055 default,
2056 skip_serializing_if = "Option::is_none"
2057 )]
2058 pub content_security_policy: Option<String>,
2059}
2060
2061#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2063pub struct CreateIsolatedWorldReturns {
2064 #[serde(rename = "executionContextId")]
2066 pub execution_context_id: crate::protocol::runtime::ExecutionContextId,
2067}
2068
2069impl crate::typed::Command for CreateIsolatedWorldParams {
2070 const METHOD: &'static str = "Page.createIsolatedWorld";
2071 type Returns = CreateIsolatedWorldReturns;
2072}
2073
2074#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2082pub struct DeleteCookieParams {
2083 #[serde(rename = "cookieName")]
2085 pub cookie_name: String,
2086 pub url: String,
2088}
2089
2090impl crate::typed::Command for DeleteCookieParams {
2091 const METHOD: &'static str = "Page.deleteCookie";
2092 type Returns = crate::typed::NoReturns;
2093}
2094
2095#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2099pub struct DisableParams {}
2100
2101impl crate::typed::Command for DisableParams {
2102 const METHOD: &'static str = "Page.disable";
2103 type Returns = crate::typed::NoReturns;
2104}
2105
2106#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2110pub struct EnableParams {
2111 #[serde(
2117 rename = "enableFileChooserOpenedEvent",
2118 default,
2119 skip_serializing_if = "Option::is_none"
2120 )]
2121 pub enable_file_chooser_opened_event: Option<bool>,
2122}
2123
2124impl crate::typed::Command for EnableParams {
2125 const METHOD: &'static str = "Page.enable";
2126 type Returns = crate::typed::NoReturns;
2127}
2128
2129#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2136pub struct GetAppManifestParams {
2137 #[serde(
2138 rename = "manifestId",
2139 default,
2140 skip_serializing_if = "Option::is_none"
2141 )]
2142 pub manifest_id: Option<String>,
2143}
2144
2145#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2147pub struct GetAppManifestReturns {
2148 pub url: String,
2150 pub errors: Vec<AppManifestError>,
2151 #[serde(default, skip_serializing_if = "Option::is_none")]
2153 pub data: Option<String>,
2154 #[serde(default, skip_serializing_if = "Option::is_none")]
2160 pub parsed: Option<AppManifestParsedProperties>,
2161 pub manifest: WebAppManifest,
2163}
2164
2165impl crate::typed::Command for GetAppManifestParams {
2166 const METHOD: &'static str = "Page.getAppManifest";
2167 type Returns = GetAppManifestReturns;
2168}
2169
2170#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2174pub struct GetInstallabilityErrorsParams {}
2175
2176#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2178pub struct GetInstallabilityErrorsReturns {
2179 #[serde(rename = "installabilityErrors")]
2180 pub installability_errors: Vec<InstallabilityError>,
2181}
2182
2183impl crate::typed::Command for GetInstallabilityErrorsParams {
2184 const METHOD: &'static str = "Page.getInstallabilityErrors";
2185 type Returns = GetInstallabilityErrorsReturns;
2186}
2187
2188#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2197pub struct GetManifestIconsParams {}
2198
2199#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2201pub struct GetManifestIconsReturns {
2202 #[serde(
2203 rename = "primaryIcon",
2204 default,
2205 skip_serializing_if = "Option::is_none"
2206 )]
2207 pub primary_icon: Option<String>,
2208}
2209
2210impl crate::typed::Command for GetManifestIconsParams {
2211 const METHOD: &'static str = "Page.getManifestIcons";
2212 type Returns = GetManifestIconsReturns;
2213}
2214
2215#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2223pub struct GetAppIdParams {}
2224
2225#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2227pub struct GetAppIdReturns {
2228 #[serde(rename = "appId", default, skip_serializing_if = "Option::is_none")]
2230 pub app_id: Option<String>,
2231 #[serde(
2234 rename = "recommendedId",
2235 default,
2236 skip_serializing_if = "Option::is_none"
2237 )]
2238 pub recommended_id: Option<String>,
2239 #[serde(rename = "bundleId", default, skip_serializing_if = "Option::is_none")]
2241 pub bundle_id: Option<String>,
2242 #[serde(
2244 rename = "parentAppName",
2245 default,
2246 skip_serializing_if = "Option::is_none"
2247 )]
2248 pub parent_app_name: Option<String>,
2249}
2250
2251impl crate::typed::Command for GetAppIdParams {
2252 const METHOD: &'static str = "Page.getAppId";
2253 type Returns = GetAppIdReturns;
2254}
2255
2256#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2262pub struct GetSubAppsParams {}
2263
2264#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2266pub struct GetSubAppsReturns {
2267 #[serde(rename = "subApps")]
2268 pub sub_apps: Vec<SubApp>,
2269}
2270
2271impl crate::typed::Command for GetSubAppsParams {
2272 const METHOD: &'static str = "Page.getSubApps";
2273 type Returns = GetSubAppsReturns;
2274}
2275
2276#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2283pub struct GetSiblingSubAppsParams {}
2284
2285#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2287pub struct GetSiblingSubAppsReturns {
2288 #[serde(rename = "subApps")]
2289 pub sub_apps: Vec<SubApp>,
2290}
2291
2292impl crate::typed::Command for GetSiblingSubAppsParams {
2293 const METHOD: &'static str = "Page.getSiblingSubApps";
2294 type Returns = GetSiblingSubAppsReturns;
2295}
2296
2297#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2301pub struct GetAdScriptAncestryParams {
2302 #[serde(rename = "frameId")]
2303 pub frame_id: FrameId,
2304}
2305
2306#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2308pub struct GetAdScriptAncestryReturns {
2309 #[serde(
2315 rename = "adScriptAncestry",
2316 default,
2317 skip_serializing_if = "Option::is_none"
2318 )]
2319 pub ad_script_ancestry: Option<crate::protocol::network::AdAncestry>,
2320}
2321
2322impl crate::typed::Command for GetAdScriptAncestryParams {
2323 const METHOD: &'static str = "Page.getAdScriptAncestry";
2324 type Returns = GetAdScriptAncestryReturns;
2325}
2326
2327#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2336pub struct GetSpellCheckCustomDictionaryParams {
2337 #[serde(rename = "frameId")]
2338 pub frame_id: FrameId,
2339}
2340
2341#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2343pub struct GetSpellCheckCustomDictionaryReturns {
2344 pub words: Vec<String>,
2345}
2346
2347impl crate::typed::Command for GetSpellCheckCustomDictionaryParams {
2348 const METHOD: &'static str = "Page.getSpellCheckCustomDictionary";
2349 type Returns = GetSpellCheckCustomDictionaryReturns;
2350}
2351
2352#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2356pub struct GetFrameTreeParams {}
2357
2358#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2360pub struct GetFrameTreeReturns {
2361 #[serde(rename = "frameTree")]
2363 pub frame_tree: FrameTree,
2364}
2365
2366impl crate::typed::Command for GetFrameTreeParams {
2367 const METHOD: &'static str = "Page.getFrameTree";
2368 type Returns = GetFrameTreeReturns;
2369}
2370
2371#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2376pub struct GetLayoutMetricsParams {}
2377
2378#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2380pub struct GetLayoutMetricsReturns {
2381 #[serde(rename = "layoutViewport")]
2386 pub layout_viewport: LayoutViewport,
2387 #[serde(rename = "visualViewport")]
2392 pub visual_viewport: VisualViewport,
2393 #[serde(rename = "contentSize")]
2398 pub content_size: crate::protocol::dom::Rect,
2399 #[serde(rename = "cssLayoutViewport")]
2401 pub css_layout_viewport: LayoutViewport,
2402 #[serde(rename = "cssVisualViewport")]
2404 pub css_visual_viewport: VisualViewport,
2405 #[serde(rename = "cssContentSize")]
2407 pub css_content_size: crate::protocol::dom::Rect,
2408}
2409
2410impl crate::typed::Command for GetLayoutMetricsParams {
2411 const METHOD: &'static str = "Page.getLayoutMetrics";
2412 type Returns = GetLayoutMetricsReturns;
2413}
2414
2415#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2419pub struct GetNavigationHistoryParams {}
2420
2421#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2423pub struct GetNavigationHistoryReturns {
2424 #[serde(rename = "currentIndex")]
2426 pub current_index: i64,
2427 pub entries: Vec<NavigationEntry>,
2429}
2430
2431impl crate::typed::Command for GetNavigationHistoryParams {
2432 const METHOD: &'static str = "Page.getNavigationHistory";
2433 type Returns = GetNavigationHistoryReturns;
2434}
2435
2436#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2440pub struct ResetNavigationHistoryParams {}
2441
2442impl crate::typed::Command for ResetNavigationHistoryParams {
2443 const METHOD: &'static str = "Page.resetNavigationHistory";
2444 type Returns = crate::typed::NoReturns;
2445}
2446
2447#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2453pub struct GetResourceContentParams {
2454 #[serde(rename = "frameId")]
2456 pub frame_id: FrameId,
2457 pub url: String,
2459}
2460
2461#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2463pub struct GetResourceContentReturns {
2464 pub content: String,
2466 #[serde(rename = "base64Encoded")]
2468 pub base64_encoded: bool,
2469}
2470
2471impl crate::typed::Command for GetResourceContentParams {
2472 const METHOD: &'static str = "Page.getResourceContent";
2473 type Returns = GetResourceContentReturns;
2474}
2475
2476#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2482pub struct GetResourceTreeParams {}
2483
2484#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2486pub struct GetResourceTreeReturns {
2487 #[serde(rename = "frameTree")]
2489 pub frame_tree: FrameResourceTree,
2490}
2491
2492impl crate::typed::Command for GetResourceTreeParams {
2493 const METHOD: &'static str = "Page.getResourceTree";
2494 type Returns = GetResourceTreeReturns;
2495}
2496
2497#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2502pub struct HandleJavaScriptDialogParams {
2503 pub accept: bool,
2505 #[serde(
2508 rename = "promptText",
2509 default,
2510 skip_serializing_if = "Option::is_none"
2511 )]
2512 pub prompt_text: Option<String>,
2513}
2514
2515impl crate::typed::Command for HandleJavaScriptDialogParams {
2516 const METHOD: &'static str = "Page.handleJavaScriptDialog";
2517 type Returns = crate::typed::NoReturns;
2518}
2519
2520#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2524pub struct NavigateParams {
2525 pub url: String,
2527 #[serde(default, skip_serializing_if = "Option::is_none")]
2529 pub referrer: Option<String>,
2530 #[serde(
2532 rename = "transitionType",
2533 default,
2534 skip_serializing_if = "Option::is_none"
2535 )]
2536 pub transition_type: Option<TransitionType>,
2537 #[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
2539 pub frame_id: Option<FrameId>,
2540 #[serde(
2544 rename = "referrerPolicy",
2545 default,
2546 skip_serializing_if = "Option::is_none"
2547 )]
2548 pub referrer_policy: Option<ReferrerPolicy>,
2549}
2550
2551#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2553pub struct NavigateReturns {
2554 #[serde(rename = "frameId")]
2556 pub frame_id: FrameId,
2557 #[serde(rename = "loaderId", default, skip_serializing_if = "Option::is_none")]
2560 pub loader_id: Option<crate::protocol::network::LoaderId>,
2561 #[serde(rename = "errorText", default, skip_serializing_if = "Option::is_none")]
2563 pub error_text: Option<String>,
2564 #[serde(
2568 rename = "isDownload",
2569 default,
2570 skip_serializing_if = "Option::is_none"
2571 )]
2572 pub is_download: Option<bool>,
2573}
2574
2575impl crate::typed::Command for NavigateParams {
2576 const METHOD: &'static str = "Page.navigate";
2577 type Returns = NavigateReturns;
2578}
2579
2580#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2584pub struct NavigateToHistoryEntryParams {
2585 #[serde(rename = "entryId")]
2587 pub entry_id: i64,
2588}
2589
2590impl crate::typed::Command for NavigateToHistoryEntryParams {
2591 const METHOD: &'static str = "Page.navigateToHistoryEntry";
2592 type Returns = crate::typed::NoReturns;
2593}
2594
2595#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2599pub struct PrintToPdfParams {
2600 #[serde(default, skip_serializing_if = "Option::is_none")]
2602 pub landscape: Option<bool>,
2603 #[serde(
2605 rename = "displayHeaderFooter",
2606 default,
2607 skip_serializing_if = "Option::is_none"
2608 )]
2609 pub display_header_footer: Option<bool>,
2610 #[serde(
2612 rename = "printBackground",
2613 default,
2614 skip_serializing_if = "Option::is_none"
2615 )]
2616 pub print_background: Option<bool>,
2617 #[serde(default, skip_serializing_if = "Option::is_none")]
2619 pub scale: Option<f64>,
2620 #[serde(
2622 rename = "paperWidth",
2623 default,
2624 skip_serializing_if = "Option::is_none"
2625 )]
2626 pub paper_width: Option<f64>,
2627 #[serde(
2629 rename = "paperHeight",
2630 default,
2631 skip_serializing_if = "Option::is_none"
2632 )]
2633 pub paper_height: Option<f64>,
2634 #[serde(rename = "marginTop", default, skip_serializing_if = "Option::is_none")]
2636 pub margin_top: Option<f64>,
2637 #[serde(
2639 rename = "marginBottom",
2640 default,
2641 skip_serializing_if = "Option::is_none"
2642 )]
2643 pub margin_bottom: Option<f64>,
2644 #[serde(
2646 rename = "marginLeft",
2647 default,
2648 skip_serializing_if = "Option::is_none"
2649 )]
2650 pub margin_left: Option<f64>,
2651 #[serde(
2653 rename = "marginRight",
2654 default,
2655 skip_serializing_if = "Option::is_none"
2656 )]
2657 pub margin_right: Option<f64>,
2658 #[serde(
2666 rename = "pageRanges",
2667 default,
2668 skip_serializing_if = "Option::is_none"
2669 )]
2670 pub page_ranges: Option<String>,
2671 #[serde(
2678 rename = "headerTemplate",
2679 default,
2680 skip_serializing_if = "Option::is_none"
2681 )]
2682 pub header_template: Option<String>,
2683 #[serde(
2686 rename = "footerTemplate",
2687 default,
2688 skip_serializing_if = "Option::is_none"
2689 )]
2690 pub footer_template: Option<String>,
2691 #[serde(
2694 rename = "preferCSSPageSize",
2695 default,
2696 skip_serializing_if = "Option::is_none"
2697 )]
2698 pub prefer_css_page_size: Option<bool>,
2699 #[serde(
2703 rename = "transferMode",
2704 default,
2705 skip_serializing_if = "Option::is_none"
2706 )]
2707 pub transfer_mode: Option<PrintToPdfTransferMode>,
2708 #[serde(
2713 rename = "generateTaggedPDF",
2714 default,
2715 skip_serializing_if = "Option::is_none"
2716 )]
2717 pub generate_tagged_pdf: Option<bool>,
2718 #[serde(
2722 rename = "generateDocumentOutline",
2723 default,
2724 skip_serializing_if = "Option::is_none"
2725 )]
2726 pub generate_document_outline: Option<bool>,
2727}
2728
2729#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2731pub enum PrintToPdfTransferMode {
2732 ReturnAsBase64,
2734 ReturnAsStream,
2736 #[serde(untagged)]
2740 Unrecognized(String),
2741}
2742
2743#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2745pub struct PrintToPdfReturns {
2746 pub data: String,
2749 #[serde(default, skip_serializing_if = "Option::is_none")]
2753 pub stream: Option<crate::protocol::io::StreamHandle>,
2754}
2755
2756impl crate::typed::Command for PrintToPdfParams {
2757 const METHOD: &'static str = "Page.printToPDF";
2758 type Returns = PrintToPdfReturns;
2759}
2760
2761#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2765pub struct ReloadParams {
2766 #[serde(
2768 rename = "ignoreCache",
2769 default,
2770 skip_serializing_if = "Option::is_none"
2771 )]
2772 pub ignore_cache: Option<bool>,
2773 #[serde(
2776 rename = "scriptToEvaluateOnLoad",
2777 default,
2778 skip_serializing_if = "Option::is_none"
2779 )]
2780 pub script_to_evaluate_on_load: Option<String>,
2781 #[serde(rename = "loaderId", default, skip_serializing_if = "Option::is_none")]
2787 pub loader_id: Option<crate::protocol::network::LoaderId>,
2788}
2789
2790impl crate::typed::Command for ReloadParams {
2791 const METHOD: &'static str = "Page.reload";
2792 type Returns = crate::typed::NoReturns;
2793}
2794
2795#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2803pub struct RemoveScriptToEvaluateOnLoadParams {
2804 pub identifier: ScriptIdentifier,
2805}
2806
2807impl crate::typed::Command for RemoveScriptToEvaluateOnLoadParams {
2808 const METHOD: &'static str = "Page.removeScriptToEvaluateOnLoad";
2809 type Returns = crate::typed::NoReturns;
2810}
2811
2812#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2816pub struct RemoveScriptToEvaluateOnNewDocumentParams {
2817 pub identifier: ScriptIdentifier,
2818}
2819
2820impl crate::typed::Command for RemoveScriptToEvaluateOnNewDocumentParams {
2821 const METHOD: &'static str = "Page.removeScriptToEvaluateOnNewDocument";
2822 type Returns = crate::typed::NoReturns;
2823}
2824
2825#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2831pub struct ScreencastFrameAckParams {
2832 #[serde(rename = "sessionId")]
2834 pub session_id: i64,
2835}
2836
2837impl crate::typed::Command for ScreencastFrameAckParams {
2838 const METHOD: &'static str = "Page.screencastFrameAck";
2839 type Returns = crate::typed::NoReturns;
2840}
2841
2842#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2848pub struct SearchInResourceParams {
2849 #[serde(rename = "frameId")]
2851 pub frame_id: FrameId,
2852 pub url: String,
2854 pub query: String,
2856 #[serde(
2858 rename = "caseSensitive",
2859 default,
2860 skip_serializing_if = "Option::is_none"
2861 )]
2862 pub case_sensitive: Option<bool>,
2863 #[serde(rename = "isRegex", default, skip_serializing_if = "Option::is_none")]
2865 pub is_regex: Option<bool>,
2866}
2867
2868#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2870pub struct SearchInResourceReturns {
2871 pub result: Vec<crate::protocol::debugger::SearchMatch>,
2873}
2874
2875impl crate::typed::Command for SearchInResourceParams {
2876 const METHOD: &'static str = "Page.searchInResource";
2877 type Returns = SearchInResourceReturns;
2878}
2879
2880#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2886pub struct SetAdBlockingEnabledParams {
2887 pub enabled: bool,
2889}
2890
2891impl crate::typed::Command for SetAdBlockingEnabledParams {
2892 const METHOD: &'static str = "Page.setAdBlockingEnabled";
2893 type Returns = crate::typed::NoReturns;
2894}
2895
2896#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2900pub struct SetBypassCspParams {
2901 pub enabled: bool,
2903}
2904
2905impl crate::typed::Command for SetBypassCspParams {
2906 const METHOD: &'static str = "Page.setBypassCSP";
2907 type Returns = crate::typed::NoReturns;
2908}
2909
2910#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2916pub struct GetPermissionsPolicyStateParams {
2917 #[serde(rename = "frameId")]
2918 pub frame_id: FrameId,
2919}
2920
2921#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2923pub struct GetPermissionsPolicyStateReturns {
2924 pub states: Vec<PermissionsPolicyFeatureState>,
2925}
2926
2927impl crate::typed::Command for GetPermissionsPolicyStateParams {
2928 const METHOD: &'static str = "Page.getPermissionsPolicyState";
2929 type Returns = GetPermissionsPolicyStateReturns;
2930}
2931
2932#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2938pub struct GetOriginTrialsParams {
2939 #[serde(rename = "frameId")]
2940 pub frame_id: FrameId,
2941}
2942
2943#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2945pub struct GetOriginTrialsReturns {
2946 #[serde(rename = "originTrials")]
2947 pub origin_trials: Vec<OriginTrial>,
2948}
2949
2950impl crate::typed::Command for GetOriginTrialsParams {
2951 const METHOD: &'static str = "Page.getOriginTrials";
2952 type Returns = GetOriginTrialsReturns;
2953}
2954
2955#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2965pub struct SetDeviceMetricsOverrideParams {
2966 pub width: i64,
2969 pub height: i64,
2972 #[serde(rename = "deviceScaleFactor")]
2974 pub device_scale_factor: f64,
2975 pub mobile: bool,
2978 #[serde(default, skip_serializing_if = "Option::is_none")]
2980 pub scale: Option<f64>,
2981 #[serde(
2983 rename = "screenWidth",
2984 default,
2985 skip_serializing_if = "Option::is_none"
2986 )]
2987 pub screen_width: Option<i64>,
2988 #[serde(
2990 rename = "screenHeight",
2991 default,
2992 skip_serializing_if = "Option::is_none"
2993 )]
2994 pub screen_height: Option<i64>,
2995 #[serde(rename = "positionX", default, skip_serializing_if = "Option::is_none")]
2998 pub position_x: Option<i64>,
2999 #[serde(rename = "positionY", default, skip_serializing_if = "Option::is_none")]
3002 pub position_y: Option<i64>,
3003 #[serde(
3005 rename = "dontSetVisibleSize",
3006 default,
3007 skip_serializing_if = "Option::is_none"
3008 )]
3009 pub dont_set_visible_size: Option<bool>,
3010 #[serde(
3012 rename = "screenOrientation",
3013 default,
3014 skip_serializing_if = "Option::is_none"
3015 )]
3016 pub screen_orientation: Option<crate::protocol::emulation::ScreenOrientation>,
3017 #[serde(default, skip_serializing_if = "Option::is_none")]
3019 pub viewport: Option<Viewport>,
3020}
3021
3022impl crate::typed::Command for SetDeviceMetricsOverrideParams {
3023 const METHOD: &'static str = "Page.setDeviceMetricsOverride";
3024 type Returns = crate::typed::NoReturns;
3025}
3026
3027#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3035pub struct SetDeviceOrientationOverrideParams {
3036 pub alpha: f64,
3038 pub beta: f64,
3040 pub gamma: f64,
3042}
3043
3044impl crate::typed::Command for SetDeviceOrientationOverrideParams {
3045 const METHOD: &'static str = "Page.setDeviceOrientationOverride";
3046 type Returns = crate::typed::NoReturns;
3047}
3048
3049#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3055pub struct SetFontFamiliesParams {
3056 #[serde(rename = "fontFamilies")]
3059 pub font_families: FontFamilies,
3060 #[serde(
3062 rename = "forScripts",
3063 default,
3064 skip_serializing_if = "Option::is_none"
3065 )]
3066 pub for_scripts: Option<Vec<ScriptFontFamilies>>,
3067}
3068
3069impl crate::typed::Command for SetFontFamiliesParams {
3070 const METHOD: &'static str = "Page.setFontFamilies";
3071 type Returns = crate::typed::NoReturns;
3072}
3073
3074#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3080pub struct SetFontSizesParams {
3081 #[serde(rename = "fontSizes")]
3084 pub font_sizes: FontSizes,
3085}
3086
3087impl crate::typed::Command for SetFontSizesParams {
3088 const METHOD: &'static str = "Page.setFontSizes";
3089 type Returns = crate::typed::NoReturns;
3090}
3091
3092#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3096pub struct SetDocumentContentParams {
3097 #[serde(rename = "frameId")]
3099 pub frame_id: FrameId,
3100 pub html: String,
3102}
3103
3104impl crate::typed::Command for SetDocumentContentParams {
3105 const METHOD: &'static str = "Page.setDocumentContent";
3106 type Returns = crate::typed::NoReturns;
3107}
3108
3109#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3117pub struct SetDownloadBehaviorParams {
3118 pub behavior: SetDownloadBehaviorBehavior,
3121 #[serde(
3124 rename = "downloadPath",
3125 default,
3126 skip_serializing_if = "Option::is_none"
3127 )]
3128 pub download_path: Option<String>,
3129}
3130
3131#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3133pub enum SetDownloadBehaviorBehavior {
3134 #[serde(rename = "deny")]
3136 Deny,
3137 #[serde(rename = "allow")]
3139 Allow,
3140 #[serde(rename = "default")]
3142 Default,
3143 #[serde(untagged)]
3147 Unrecognized(String),
3148}
3149
3150impl crate::typed::Command for SetDownloadBehaviorParams {
3151 const METHOD: &'static str = "Page.setDownloadBehavior";
3152 type Returns = crate::typed::NoReturns;
3153}
3154
3155#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3162pub struct SetGeolocationOverrideParams {
3163 #[serde(default, skip_serializing_if = "Option::is_none")]
3165 pub latitude: Option<f64>,
3166 #[serde(default, skip_serializing_if = "Option::is_none")]
3168 pub longitude: Option<f64>,
3169 #[serde(default, skip_serializing_if = "Option::is_none")]
3171 pub accuracy: Option<f64>,
3172}
3173
3174impl crate::typed::Command for SetGeolocationOverrideParams {
3175 const METHOD: &'static str = "Page.setGeolocationOverride";
3176 type Returns = crate::typed::NoReturns;
3177}
3178
3179#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3183pub struct SetLifecycleEventsEnabledParams {
3184 pub enabled: bool,
3186}
3187
3188impl crate::typed::Command for SetLifecycleEventsEnabledParams {
3189 const METHOD: &'static str = "Page.setLifecycleEventsEnabled";
3190 type Returns = crate::typed::NoReturns;
3191}
3192
3193#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3201pub struct SetTouchEmulationEnabledParams {
3202 pub enabled: bool,
3204 #[serde(default, skip_serializing_if = "Option::is_none")]
3206 pub configuration: Option<SetTouchEmulationEnabledConfiguration>,
3207}
3208
3209#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3211pub enum SetTouchEmulationEnabledConfiguration {
3212 #[serde(rename = "mobile")]
3214 Mobile,
3215 #[serde(rename = "desktop")]
3217 Desktop,
3218 #[serde(untagged)]
3222 Unrecognized(String),
3223}
3224
3225impl crate::typed::Command for SetTouchEmulationEnabledParams {
3226 const METHOD: &'static str = "Page.setTouchEmulationEnabled";
3227 type Returns = crate::typed::NoReturns;
3228}
3229
3230#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3236pub struct StartScreencastParams {
3237 #[serde(default, skip_serializing_if = "Option::is_none")]
3239 pub format: Option<StartScreencastFormat>,
3240 #[serde(default, skip_serializing_if = "Option::is_none")]
3242 pub quality: Option<i64>,
3243 #[serde(rename = "maxWidth", default, skip_serializing_if = "Option::is_none")]
3245 pub max_width: Option<i64>,
3246 #[serde(rename = "maxHeight", default, skip_serializing_if = "Option::is_none")]
3248 pub max_height: Option<i64>,
3249 #[serde(
3251 rename = "everyNthFrame",
3252 default,
3253 skip_serializing_if = "Option::is_none"
3254 )]
3255 pub every_nth_frame: Option<i64>,
3256 #[serde(
3259 rename = "maxFramesInFlight",
3260 default,
3261 skip_serializing_if = "Option::is_none"
3262 )]
3263 pub max_frames_in_flight: Option<i64>,
3264 #[serde(
3269 rename = "sendLastFrame",
3270 default,
3271 skip_serializing_if = "Option::is_none"
3272 )]
3273 pub send_last_frame: Option<bool>,
3274}
3275
3276#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3278pub enum StartScreencastFormat {
3279 #[serde(rename = "jpeg")]
3281 Jpeg,
3282 #[serde(rename = "png")]
3284 Png,
3285 #[serde(untagged)]
3289 Unrecognized(String),
3290}
3291
3292impl crate::typed::Command for StartScreencastParams {
3293 const METHOD: &'static str = "Page.startScreencast";
3294 type Returns = crate::typed::NoReturns;
3295}
3296
3297#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3303pub struct StartScreenRecordingParams {
3304 #[serde(default, skip_serializing_if = "Option::is_none")]
3305 pub audio: Option<bool>,
3306 #[serde(rename = "maxWidth", default, skip_serializing_if = "Option::is_none")]
3308 pub max_width: Option<i64>,
3309 #[serde(rename = "maxHeight", default, skip_serializing_if = "Option::is_none")]
3311 pub max_height: Option<i64>,
3312 #[serde(rename = "frameRate", default, skip_serializing_if = "Option::is_none")]
3314 pub frame_rate: Option<i64>,
3315 #[serde(
3319 rename = "captureArea",
3320 default,
3321 skip_serializing_if = "Option::is_none"
3322 )]
3323 pub capture_area: Option<StartScreenRecordingCaptureArea>,
3324}
3325
3326#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3328pub enum StartScreenRecordingCaptureArea {
3329 #[serde(rename = "target")]
3331 Target,
3332 #[serde(rename = "browserWindow")]
3334 BrowserWindow,
3335 #[serde(untagged)]
3339 Unrecognized(String),
3340}
3341
3342#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3344pub struct StartScreenRecordingReturns {
3345 pub stream: crate::protocol::io::StreamHandle,
3349}
3350
3351impl crate::typed::Command for StartScreenRecordingParams {
3352 const METHOD: &'static str = "Page.startScreenRecording";
3353 type Returns = StartScreenRecordingReturns;
3354}
3355
3356#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3362pub struct StopScreenRecordingParams {}
3363
3364#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3366pub struct StopScreenRecordingReturns {
3367 pub stream: crate::protocol::io::StreamHandle,
3371}
3372
3373impl crate::typed::Command for StopScreenRecordingParams {
3374 const METHOD: &'static str = "Page.stopScreenRecording";
3375 type Returns = StopScreenRecordingReturns;
3376}
3377
3378#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3382pub struct StopLoadingParams {}
3383
3384impl crate::typed::Command for StopLoadingParams {
3385 const METHOD: &'static str = "Page.stopLoading";
3386 type Returns = crate::typed::NoReturns;
3387}
3388
3389#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3395pub struct CrashParams {}
3396
3397impl crate::typed::Command for CrashParams {
3398 const METHOD: &'static str = "Page.crash";
3399 type Returns = crate::typed::NoReturns;
3400}
3401
3402#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3406pub struct CloseParams {}
3407
3408impl crate::typed::Command for CloseParams {
3409 const METHOD: &'static str = "Page.close";
3410 type Returns = crate::typed::NoReturns;
3411}
3412
3413#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3421pub struct SetWebLifecycleStateParams {
3422 pub state: SetWebLifecycleStateState,
3424}
3425
3426#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3428pub enum SetWebLifecycleStateState {
3429 #[serde(rename = "frozen")]
3431 Frozen,
3432 #[serde(rename = "active")]
3434 Active,
3435 #[serde(untagged)]
3439 Unrecognized(String),
3440}
3441
3442impl crate::typed::Command for SetWebLifecycleStateParams {
3443 const METHOD: &'static str = "Page.setWebLifecycleState";
3444 type Returns = crate::typed::NoReturns;
3445}
3446
3447#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3453pub struct StopScreencastParams {}
3454
3455impl crate::typed::Command for StopScreencastParams {
3456 const METHOD: &'static str = "Page.stopScreencast";
3457 type Returns = crate::typed::NoReturns;
3458}
3459
3460#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3471pub struct ProduceCompilationCacheParams {
3472 pub scripts: Vec<CompilationCacheParams>,
3473}
3474
3475impl crate::typed::Command for ProduceCompilationCacheParams {
3476 const METHOD: &'static str = "Page.produceCompilationCache";
3477 type Returns = crate::typed::NoReturns;
3478}
3479
3480#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3487pub struct AddCompilationCacheParams {
3488 pub url: String,
3489 pub data: String,
3491}
3492
3493impl crate::typed::Command for AddCompilationCacheParams {
3494 const METHOD: &'static str = "Page.addCompilationCache";
3495 type Returns = crate::typed::NoReturns;
3496}
3497
3498#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3504pub struct ClearCompilationCacheParams {}
3505
3506impl crate::typed::Command for ClearCompilationCacheParams {
3507 const METHOD: &'static str = "Page.clearCompilationCache";
3508 type Returns = crate::typed::NoReturns;
3509}
3510
3511#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3518pub struct SetSpcTransactionModeParams {
3519 pub mode: SetSpcTransactionModeMode,
3520}
3521
3522#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3524pub enum SetSpcTransactionModeMode {
3525 #[serde(rename = "none")]
3527 None,
3528 #[serde(rename = "autoAccept")]
3530 AutoAccept,
3531 #[serde(rename = "autoChooseToAuthAnotherWay")]
3533 AutoChooseToAuthAnotherWay,
3534 #[serde(rename = "autoReject")]
3536 AutoReject,
3537 #[serde(rename = "autoOptOut")]
3539 AutoOptOut,
3540 #[serde(untagged)]
3544 Unrecognized(String),
3545}
3546
3547impl crate::typed::Command for SetSpcTransactionModeParams {
3548 const METHOD: &'static str = "Page.setSPCTransactionMode";
3549 type Returns = crate::typed::NoReturns;
3550}
3551
3552#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3559pub struct SetRphRegistrationModeParams {
3560 pub mode: SetRphRegistrationModeMode,
3561}
3562
3563#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3565pub enum SetRphRegistrationModeMode {
3566 #[serde(rename = "none")]
3568 None,
3569 #[serde(rename = "autoAccept")]
3571 AutoAccept,
3572 #[serde(rename = "autoReject")]
3574 AutoReject,
3575 #[serde(untagged)]
3579 Unrecognized(String),
3580}
3581
3582impl crate::typed::Command for SetRphRegistrationModeParams {
3583 const METHOD: &'static str = "Page.setRPHRegistrationMode";
3584 type Returns = crate::typed::NoReturns;
3585}
3586
3587#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3593pub struct GenerateTestReportParams {
3594 pub message: String,
3596 #[serde(default, skip_serializing_if = "Option::is_none")]
3598 pub group: Option<String>,
3599}
3600
3601impl crate::typed::Command for GenerateTestReportParams {
3602 const METHOD: &'static str = "Page.generateTestReport";
3603 type Returns = crate::typed::NoReturns;
3604}
3605
3606#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3613pub struct WaitForDebuggerParams {}
3614
3615impl crate::typed::Command for WaitForDebuggerParams {
3616 const METHOD: &'static str = "Page.waitForDebugger";
3617 type Returns = crate::typed::NoReturns;
3618}
3619
3620#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3626pub struct SetInterceptFileChooserDialogParams {
3627 pub enabled: bool,
3628 #[serde(default, skip_serializing_if = "Option::is_none")]
3634 pub cancel: Option<bool>,
3635}
3636
3637impl crate::typed::Command for SetInterceptFileChooserDialogParams {
3638 const METHOD: &'static str = "Page.setInterceptFileChooserDialog";
3639 type Returns = crate::typed::NoReturns;
3640}
3641
3642#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3652pub struct SetPrerenderingAllowedParams {
3653 #[serde(rename = "isAllowed")]
3654 pub is_allowed: bool,
3655}
3656
3657impl crate::typed::Command for SetPrerenderingAllowedParams {
3658 const METHOD: &'static str = "Page.setPrerenderingAllowed";
3659 type Returns = crate::typed::NoReturns;
3660}
3661
3662#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3669pub struct GetAnnotatedPageContentParams {
3670 #[serde(
3672 rename = "includeActionableInformation",
3673 default,
3674 skip_serializing_if = "Option::is_none"
3675 )]
3676 pub include_actionable_information: Option<bool>,
3677}
3678
3679#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3681pub struct GetAnnotatedPageContentReturns {
3682 pub content: String,
3687}
3688
3689impl crate::typed::Command for GetAnnotatedPageContentParams {
3690 const METHOD: &'static str = "Page.getAnnotatedPageContent";
3691 type Returns = GetAnnotatedPageContentReturns;
3692}
3693
3694#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3700pub struct SetInputVisualizationParams {
3701 #[serde(default, skip_serializing_if = "Option::is_none")]
3703 pub clicks: Option<bool>,
3704}
3705
3706impl crate::typed::Command for SetInputVisualizationParams {
3707 const METHOD: &'static str = "Page.setInputVisualization";
3708 type Returns = crate::typed::NoReturns;
3709}
3710
3711#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3713pub struct DomContentEventFiredEvent {
3714 pub timestamp: crate::protocol::network::MonotonicTime,
3715}
3716
3717impl crate::typed::Event for DomContentEventFiredEvent {
3718 const METHOD: &'static str = "Page.domContentEventFired";
3719}
3720
3721#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3725pub struct FileChooserOpenedEvent {
3726 #[serde(rename = "frameId")]
3730 pub frame_id: FrameId,
3731 pub mode: FileChooserOpenedMode,
3733 #[serde(
3738 rename = "backendNodeId",
3739 default,
3740 skip_serializing_if = "Option::is_none"
3741 )]
3742 pub backend_node_id: Option<crate::protocol::dom::BackendNodeId>,
3743}
3744
3745#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3747pub enum FileChooserOpenedMode {
3748 #[serde(rename = "selectSingle")]
3750 SelectSingle,
3751 #[serde(rename = "selectMultiple")]
3753 SelectMultiple,
3754 #[serde(untagged)]
3758 Unrecognized(String),
3759}
3760
3761impl crate::typed::Event for FileChooserOpenedEvent {
3762 const METHOD: &'static str = "Page.fileChooserOpened";
3763}
3764
3765#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3769pub struct FrameAttachedEvent {
3770 #[serde(rename = "frameId")]
3772 pub frame_id: FrameId,
3773 #[serde(rename = "parentFrameId")]
3775 pub parent_frame_id: FrameId,
3776 #[serde(default, skip_serializing_if = "Option::is_none")]
3779 pub stack: Option<crate::protocol::runtime::StackTrace>,
3780}
3781
3782impl crate::typed::Event for FrameAttachedEvent {
3783 const METHOD: &'static str = "Page.frameAttached";
3784}
3785
3786#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3792pub struct FrameClearedScheduledNavigationEvent {
3793 #[serde(rename = "frameId")]
3795 pub frame_id: FrameId,
3796}
3797
3798impl crate::typed::Event for FrameClearedScheduledNavigationEvent {
3799 const METHOD: &'static str = "Page.frameClearedScheduledNavigation";
3800}
3801
3802#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3806pub struct FrameDetachedEvent {
3807 #[serde(rename = "frameId")]
3809 pub frame_id: FrameId,
3810 pub reason: FrameDetachedReason,
3812}
3813
3814#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3816pub enum FrameDetachedReason {
3817 #[serde(rename = "remove")]
3819 Remove,
3820 #[serde(rename = "swap")]
3822 Swap,
3823 #[serde(untagged)]
3827 Unrecognized(String),
3828}
3829
3830impl crate::typed::Event for FrameDetachedEvent {
3831 const METHOD: &'static str = "Page.frameDetached";
3832}
3833
3834#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3841pub struct FrameSubtreeWillBeDetachedEvent {
3842 #[serde(rename = "frameId")]
3844 pub frame_id: FrameId,
3845}
3846
3847impl crate::typed::Event for FrameSubtreeWillBeDetachedEvent {
3848 const METHOD: &'static str = "Page.frameSubtreeWillBeDetached";
3849}
3850
3851#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3856pub struct FrameNavigatedEvent {
3857 pub frame: Frame,
3859 pub r#type: NavigationType,
3861}
3862
3863impl crate::typed::Event for FrameNavigatedEvent {
3864 const METHOD: &'static str = "Page.frameNavigated";
3865}
3866
3867#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3873pub struct DocumentOpenedEvent {
3874 pub frame: Frame,
3876}
3877
3878impl crate::typed::Event for DocumentOpenedEvent {
3879 const METHOD: &'static str = "Page.documentOpened";
3880}
3881
3882#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3886pub struct FrameResizedEvent {}
3887
3888impl crate::typed::Event for FrameResizedEvent {
3889 const METHOD: &'static str = "Page.frameResized";
3890}
3891
3892#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3904pub struct FrameStartedNavigatingEvent {
3905 #[serde(rename = "frameId")]
3907 pub frame_id: FrameId,
3908 pub url: String,
3910 #[serde(rename = "loaderId")]
3914 pub loader_id: crate::protocol::network::LoaderId,
3915 #[serde(rename = "navigationType")]
3916 pub navigation_type: FrameStartedNavigatingNavigationType,
3917}
3918
3919#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3921pub enum FrameStartedNavigatingNavigationType {
3922 #[serde(rename = "reload")]
3924 Reload,
3925 #[serde(rename = "reloadBypassingCache")]
3927 ReloadBypassingCache,
3928 #[serde(rename = "restore")]
3930 Restore,
3931 #[serde(rename = "restoreWithPost")]
3933 RestoreWithPost,
3934 #[serde(rename = "historySameDocument")]
3936 HistorySameDocument,
3937 #[serde(rename = "historyDifferentDocument")]
3939 HistoryDifferentDocument,
3940 #[serde(rename = "sameDocument")]
3942 SameDocument,
3943 #[serde(rename = "differentDocument")]
3945 DifferentDocument,
3946 #[serde(untagged)]
3950 Unrecognized(String),
3951}
3952
3953impl crate::typed::Event for FrameStartedNavigatingEvent {
3954 const METHOD: &'static str = "Page.frameStartedNavigating";
3955}
3956
3957#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3964pub struct FrameRequestedNavigationEvent {
3965 #[serde(rename = "frameId")]
3967 pub frame_id: FrameId,
3968 pub reason: ClientNavigationReason,
3970 pub url: String,
3972 pub disposition: ClientNavigationDisposition,
3974}
3975
3976impl crate::typed::Event for FrameRequestedNavigationEvent {
3977 const METHOD: &'static str = "Page.frameRequestedNavigation";
3978}
3979
3980#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3986pub struct FrameScheduledNavigationEvent {
3987 #[serde(rename = "frameId")]
3989 pub frame_id: FrameId,
3990 pub delay: f64,
3993 pub reason: ClientNavigationReason,
3995 pub url: String,
3997}
3998
3999impl crate::typed::Event for FrameScheduledNavigationEvent {
4000 const METHOD: &'static str = "Page.frameScheduledNavigation";
4001}
4002
4003#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4009pub struct FrameStartedLoadingEvent {
4010 #[serde(rename = "frameId")]
4012 pub frame_id: FrameId,
4013}
4014
4015impl crate::typed::Event for FrameStartedLoadingEvent {
4016 const METHOD: &'static str = "Page.frameStartedLoading";
4017}
4018
4019#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4025pub struct FrameStoppedLoadingEvent {
4026 #[serde(rename = "frameId")]
4028 pub frame_id: FrameId,
4029}
4030
4031impl crate::typed::Event for FrameStoppedLoadingEvent {
4032 const METHOD: &'static str = "Page.frameStoppedLoading";
4033}
4034
4035#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4044pub struct DownloadWillBeginEvent {
4045 #[serde(rename = "frameId")]
4047 pub frame_id: FrameId,
4048 pub guid: String,
4050 pub url: String,
4052 #[serde(rename = "suggestedFilename")]
4055 pub suggested_filename: String,
4056}
4057
4058impl crate::typed::Event for DownloadWillBeginEvent {
4059 const METHOD: &'static str = "Page.downloadWillBegin";
4060}
4061
4062#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4071pub struct DownloadProgressEvent {
4072 pub guid: String,
4074 #[serde(rename = "totalBytes")]
4076 pub total_bytes: f64,
4077 #[serde(rename = "receivedBytes")]
4079 pub received_bytes: f64,
4080 pub state: DownloadProgressState,
4082}
4083
4084#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4086pub enum DownloadProgressState {
4087 #[serde(rename = "inProgress")]
4089 InProgress,
4090 #[serde(rename = "completed")]
4092 Completed,
4093 #[serde(rename = "canceled")]
4095 Canceled,
4096 #[serde(untagged)]
4100 Unrecognized(String),
4101}
4102
4103impl crate::typed::Event for DownloadProgressEvent {
4104 const METHOD: &'static str = "Page.downloadProgress";
4105}
4106
4107#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4111pub struct InterstitialHiddenEvent {}
4112
4113impl crate::typed::Event for InterstitialHiddenEvent {
4114 const METHOD: &'static str = "Page.interstitialHidden";
4115}
4116
4117#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4121pub struct InterstitialShownEvent {}
4122
4123impl crate::typed::Event for InterstitialShownEvent {
4124 const METHOD: &'static str = "Page.interstitialShown";
4125}
4126
4127#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4132pub struct JavascriptDialogClosedEvent {
4133 #[serde(rename = "frameId")]
4137 pub frame_id: FrameId,
4138 pub result: bool,
4140 #[serde(rename = "userInput")]
4142 pub user_input: String,
4143}
4144
4145impl crate::typed::Event for JavascriptDialogClosedEvent {
4146 const METHOD: &'static str = "Page.javascriptDialogClosed";
4147}
4148
4149#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4154pub struct JavascriptDialogOpeningEvent {
4155 pub url: String,
4157 #[serde(rename = "frameId")]
4161 pub frame_id: FrameId,
4162 pub message: String,
4164 pub r#type: DialogType,
4166 #[serde(rename = "hasBrowserHandler")]
4171 pub has_browser_handler: bool,
4172 #[serde(
4174 rename = "defaultPrompt",
4175 default,
4176 skip_serializing_if = "Option::is_none"
4177 )]
4178 pub default_prompt: Option<String>,
4179}
4180
4181impl crate::typed::Event for JavascriptDialogOpeningEvent {
4182 const METHOD: &'static str = "Page.javascriptDialogOpening";
4183}
4184
4185#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4190pub struct LifecycleEventEvent {
4191 #[serde(rename = "frameId")]
4193 pub frame_id: FrameId,
4194 #[serde(rename = "loaderId")]
4196 pub loader_id: crate::protocol::network::LoaderId,
4197 pub name: String,
4198 pub timestamp: crate::protocol::network::MonotonicTime,
4199}
4200
4201impl crate::typed::Event for LifecycleEventEvent {
4202 const METHOD: &'static str = "Page.lifecycleEvent";
4203}
4204
4205#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4215pub struct BackForwardCacheNotUsedEvent {
4216 #[serde(rename = "loaderId")]
4218 pub loader_id: crate::protocol::network::LoaderId,
4219 #[serde(rename = "frameId")]
4221 pub frame_id: FrameId,
4222 #[serde(rename = "notRestoredExplanations")]
4224 pub not_restored_explanations: Vec<BackForwardCacheNotRestoredExplanation>,
4225 #[serde(
4227 rename = "notRestoredExplanationsTree",
4228 default,
4229 skip_serializing_if = "Option::is_none"
4230 )]
4231 pub not_restored_explanations_tree: Option<BackForwardCacheNotRestoredExplanationTree>,
4232}
4233
4234impl crate::typed::Event for BackForwardCacheNotUsedEvent {
4235 const METHOD: &'static str = "Page.backForwardCacheNotUsed";
4236}
4237
4238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4240pub struct LoadEventFiredEvent {
4241 pub timestamp: crate::protocol::network::MonotonicTime,
4242}
4243
4244impl crate::typed::Event for LoadEventFiredEvent {
4245 const METHOD: &'static str = "Page.loadEventFired";
4246}
4247
4248#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4255pub struct NavigatedWithinDocumentEvent {
4256 #[serde(rename = "frameId")]
4258 pub frame_id: FrameId,
4259 pub url: String,
4261 #[serde(rename = "navigationType")]
4263 pub navigation_type: NavigatedWithinDocumentNavigationType,
4264}
4265
4266#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4268pub enum NavigatedWithinDocumentNavigationType {
4269 #[serde(rename = "fragment")]
4271 Fragment,
4272 #[serde(rename = "historyApi")]
4274 HistoryApi,
4275 #[serde(rename = "other")]
4277 Other,
4278 #[serde(untagged)]
4282 Unrecognized(String),
4283}
4284
4285impl crate::typed::Event for NavigatedWithinDocumentEvent {
4286 const METHOD: &'static str = "Page.navigatedWithinDocument";
4287}
4288
4289#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4295pub struct ScreencastFrameEvent {
4296 pub data: String,
4299 pub metadata: ScreencastFrameMetadata,
4301 #[serde(rename = "sessionId")]
4303 pub session_id: i64,
4304}
4305
4306impl crate::typed::Event for ScreencastFrameEvent {
4307 const METHOD: &'static str = "Page.screencastFrame";
4308}
4309
4310#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4317pub struct ScreencastVisibilityChangedEvent {
4318 pub visible: bool,
4320}
4321
4322impl crate::typed::Event for ScreencastVisibilityChangedEvent {
4323 const METHOD: &'static str = "Page.screencastVisibilityChanged";
4324}
4325
4326#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4331pub struct WindowOpenEvent {
4332 pub url: String,
4334 #[serde(rename = "windowName")]
4336 pub window_name: String,
4337 #[serde(rename = "windowFeatures")]
4339 pub window_features: Vec<String>,
4340 #[serde(rename = "userGesture")]
4342 pub user_gesture: bool,
4343}
4344
4345impl crate::typed::Event for WindowOpenEvent {
4346 const METHOD: &'static str = "Page.windowOpen";
4347}
4348
4349#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4355pub struct CompilationCacheProducedEvent {
4356 pub url: String,
4357 pub data: String,
4359}
4360
4361impl crate::typed::Event for CompilationCacheProducedEvent {
4362 const METHOD: &'static str = "Page.compilationCacheProduced";
4363}