Skip to main content

cdp_driver/protocol/
overlay.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! This domain provides various functionality related to drawing atop the
5//! inspected page.
6//!
7//! Types, command parameters and event payloads for the `Overlay`
8//! domain. The method-name constants for the same domain are in
9//! [`crate::methods`].
10//!
11//! This domain is experimental and may change without notice.
12
13use serde::{Deserialize, Serialize};
14
15/// Configuration data for drawing the source order of an elements children.
16#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17pub struct SourceOrderConfig {
18    /// the color to outline the given element in.
19    #[serde(rename = "parentOutlineColor")]
20    pub parent_outline_color: crate::protocol::dom::Rgba,
21    /// the color to outline the child elements in.
22    #[serde(rename = "childOutlineColor")]
23    pub child_outline_color: crate::protocol::dom::Rgba,
24}
25
26/// Configuration data for the highlighting of Grid elements.
27#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
28pub struct GridHighlightConfig {
29    /// Whether the extension lines from grid cells to the rulers should be shown
30    /// (default: false).
31    #[serde(
32        rename = "showGridExtensionLines",
33        default,
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub show_grid_extension_lines: Option<bool>,
37    /// Show Positive line number labels (default: false).
38    #[serde(
39        rename = "showPositiveLineNumbers",
40        default,
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub show_positive_line_numbers: Option<bool>,
44    /// Show Negative line number labels (default: false).
45    #[serde(
46        rename = "showNegativeLineNumbers",
47        default,
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub show_negative_line_numbers: Option<bool>,
51    /// Show area name labels (default: false).
52    #[serde(
53        rename = "showAreaNames",
54        default,
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub show_area_names: Option<bool>,
58    /// Show line name labels (default: false).
59    #[serde(
60        rename = "showLineNames",
61        default,
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub show_line_names: Option<bool>,
65    /// Show track size labels (default: false).
66    #[serde(
67        rename = "showTrackSizes",
68        default,
69        skip_serializing_if = "Option::is_none"
70    )]
71    pub show_track_sizes: Option<bool>,
72    /// The grid container border highlight color (default: transparent).
73    #[serde(
74        rename = "gridBorderColor",
75        default,
76        skip_serializing_if = "Option::is_none"
77    )]
78    pub grid_border_color: Option<crate::protocol::dom::Rgba>,
79    /// The cell border color (default: transparent). Deprecated, please use
80    /// rowLineColor and columnLineColor instead.
81    ///
82    /// Deprecated in the protocol.
83    #[serde(
84        rename = "cellBorderColor",
85        default,
86        skip_serializing_if = "Option::is_none"
87    )]
88    pub cell_border_color: Option<crate::protocol::dom::Rgba>,
89    /// The row line color (default: transparent).
90    #[serde(
91        rename = "rowLineColor",
92        default,
93        skip_serializing_if = "Option::is_none"
94    )]
95    pub row_line_color: Option<crate::protocol::dom::Rgba>,
96    /// The column line color (default: transparent).
97    #[serde(
98        rename = "columnLineColor",
99        default,
100        skip_serializing_if = "Option::is_none"
101    )]
102    pub column_line_color: Option<crate::protocol::dom::Rgba>,
103    /// Whether the grid border is dashed (default: false).
104    #[serde(
105        rename = "gridBorderDash",
106        default,
107        skip_serializing_if = "Option::is_none"
108    )]
109    pub grid_border_dash: Option<bool>,
110    /// Whether the cell border is dashed (default: false). Deprecated, please us
111    /// rowLineDash and columnLineDash instead.
112    ///
113    /// Deprecated in the protocol.
114    #[serde(
115        rename = "cellBorderDash",
116        default,
117        skip_serializing_if = "Option::is_none"
118    )]
119    pub cell_border_dash: Option<bool>,
120    /// Whether row lines are dashed (default: false).
121    #[serde(
122        rename = "rowLineDash",
123        default,
124        skip_serializing_if = "Option::is_none"
125    )]
126    pub row_line_dash: Option<bool>,
127    /// Whether column lines are dashed (default: false).
128    #[serde(
129        rename = "columnLineDash",
130        default,
131        skip_serializing_if = "Option::is_none"
132    )]
133    pub column_line_dash: Option<bool>,
134    /// The row gap highlight fill color (default: transparent).
135    #[serde(
136        rename = "rowGapColor",
137        default,
138        skip_serializing_if = "Option::is_none"
139    )]
140    pub row_gap_color: Option<crate::protocol::dom::Rgba>,
141    /// The row gap hatching fill color (default: transparent).
142    #[serde(
143        rename = "rowHatchColor",
144        default,
145        skip_serializing_if = "Option::is_none"
146    )]
147    pub row_hatch_color: Option<crate::protocol::dom::Rgba>,
148    /// The column gap highlight fill color (default: transparent).
149    #[serde(
150        rename = "columnGapColor",
151        default,
152        skip_serializing_if = "Option::is_none"
153    )]
154    pub column_gap_color: Option<crate::protocol::dom::Rgba>,
155    /// The column gap hatching fill color (default: transparent).
156    #[serde(
157        rename = "columnHatchColor",
158        default,
159        skip_serializing_if = "Option::is_none"
160    )]
161    pub column_hatch_color: Option<crate::protocol::dom::Rgba>,
162    /// The named grid areas border color (Default: transparent).
163    #[serde(
164        rename = "areaBorderColor",
165        default,
166        skip_serializing_if = "Option::is_none"
167    )]
168    pub area_border_color: Option<crate::protocol::dom::Rgba>,
169    /// The grid container background color (Default: transparent).
170    #[serde(
171        rename = "gridBackgroundColor",
172        default,
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub grid_background_color: Option<crate::protocol::dom::Rgba>,
176}
177
178/// Configuration data for the highlighting of Flex container elements.
179#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
180pub struct FlexContainerHighlightConfig {
181    /// The style of the container border
182    #[serde(
183        rename = "containerBorder",
184        default,
185        skip_serializing_if = "Option::is_none"
186    )]
187    pub container_border: Option<LineStyle>,
188    /// The style of the separator between lines
189    #[serde(
190        rename = "lineSeparator",
191        default,
192        skip_serializing_if = "Option::is_none"
193    )]
194    pub line_separator: Option<LineStyle>,
195    /// The style of the separator between items
196    #[serde(
197        rename = "itemSeparator",
198        default,
199        skip_serializing_if = "Option::is_none"
200    )]
201    pub item_separator: Option<LineStyle>,
202    /// Style of content-distribution space on the main axis (justify-content).
203    #[serde(
204        rename = "mainDistributedSpace",
205        default,
206        skip_serializing_if = "Option::is_none"
207    )]
208    pub main_distributed_space: Option<BoxStyle>,
209    /// Style of content-distribution space on the cross axis (align-content).
210    #[serde(
211        rename = "crossDistributedSpace",
212        default,
213        skip_serializing_if = "Option::is_none"
214    )]
215    pub cross_distributed_space: Option<BoxStyle>,
216    /// Style of empty space caused by row gaps (gap/row-gap).
217    #[serde(
218        rename = "rowGapSpace",
219        default,
220        skip_serializing_if = "Option::is_none"
221    )]
222    pub row_gap_space: Option<BoxStyle>,
223    /// Style of empty space caused by columns gaps (gap/column-gap).
224    #[serde(
225        rename = "columnGapSpace",
226        default,
227        skip_serializing_if = "Option::is_none"
228    )]
229    pub column_gap_space: Option<BoxStyle>,
230    /// Style of the self-alignment line (align-items).
231    #[serde(
232        rename = "crossAlignment",
233        default,
234        skip_serializing_if = "Option::is_none"
235    )]
236    pub cross_alignment: Option<LineStyle>,
237}
238
239/// Configuration data for the highlighting of Flex item elements.
240#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
241pub struct FlexItemHighlightConfig {
242    /// Style of the box representing the item's base size
243    #[serde(
244        rename = "baseSizeBox",
245        default,
246        skip_serializing_if = "Option::is_none"
247    )]
248    pub base_size_box: Option<BoxStyle>,
249    /// Style of the border around the box representing the item's base size
250    #[serde(
251        rename = "baseSizeBorder",
252        default,
253        skip_serializing_if = "Option::is_none"
254    )]
255    pub base_size_border: Option<LineStyle>,
256    /// Style of the arrow representing if the item grew or shrank
257    #[serde(
258        rename = "flexibilityArrow",
259        default,
260        skip_serializing_if = "Option::is_none"
261    )]
262    pub flexibility_arrow: Option<LineStyle>,
263}
264
265/// Style information for drawing a line.
266#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
267pub struct LineStyle {
268    /// The color of the line (default: transparent)
269    #[serde(default, skip_serializing_if = "Option::is_none")]
270    pub color: Option<crate::protocol::dom::Rgba>,
271    /// The line pattern (default: solid)
272    #[serde(default, skip_serializing_if = "Option::is_none")]
273    pub pattern: Option<LineStylePattern>,
274}
275
276/// The values `pattern` accepts on `LineStyle`.
277#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
278pub enum LineStylePattern {
279    /// `dashed`
280    #[serde(rename = "dashed")]
281    Dashed,
282    /// `dotted`
283    #[serde(rename = "dotted")]
284    Dotted,
285    /// A value this vendored schema does not list. Chrome adds values ahead of
286    /// the published protocol, so an unrecognised one is kept as it arrived
287    /// rather than failing the payload it came in.
288    #[serde(untagged)]
289    Unrecognized(String),
290}
291
292/// Style information for drawing a box.
293#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
294pub struct BoxStyle {
295    /// The background color for the box (default: transparent)
296    #[serde(rename = "fillColor", default, skip_serializing_if = "Option::is_none")]
297    pub fill_color: Option<crate::protocol::dom::Rgba>,
298    /// The hatching color for the box (default: transparent)
299    #[serde(
300        rename = "hatchColor",
301        default,
302        skip_serializing_if = "Option::is_none"
303    )]
304    pub hatch_color: Option<crate::protocol::dom::Rgba>,
305}
306
307#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
308pub enum ContrastAlgorithm {
309    /// `aa`
310    #[serde(rename = "aa")]
311    Aa,
312    /// `aaa`
313    #[serde(rename = "aaa")]
314    Aaa,
315    /// `apca`
316    #[serde(rename = "apca")]
317    Apca,
318    /// A value this vendored schema does not list. Chrome adds values ahead of
319    /// the published protocol, so an unrecognised one is kept as it arrived
320    /// rather than failing the payload it came in.
321    #[serde(untagged)]
322    Unrecognized(String),
323}
324
325/// Configuration for Inset-Modified Containing Block (IMCB) and CSS Anchor
326/// Positioning highlight.
327#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
328pub struct ImcbHighlightConfig {
329    /// Border color for the Inset-Modified Containing Block (default:
330    /// transparent).
331    #[serde(
332        rename = "imcbBorderColor",
333        default,
334        skip_serializing_if = "Option::is_none"
335    )]
336    pub imcb_border_color: Option<crate::protocol::dom::Rgba>,
337    /// Background fill color for the Inset-Modified Containing Block (default:
338    /// transparent).
339    #[serde(
340        rename = "imcbBackgroundColor",
341        default,
342        skip_serializing_if = "Option::is_none"
343    )]
344    pub imcb_background_color: Option<crate::protocol::dom::Rgba>,
345    /// Fill color for the inset modifiers area (difference between CB and IMCB).
346    #[serde(
347        rename = "insetsBackgroundColor",
348        default,
349        skip_serializing_if = "Option::is_none"
350    )]
351    pub insets_background_color: Option<crate::protocol::dom::Rgba>,
352    /// Hatch color for the inset modifiers area.
353    #[serde(
354        rename = "insetsHatchColor",
355        default,
356        skip_serializing_if = "Option::is_none"
357    )]
358    pub insets_hatch_color: Option<crate::protocol::dom::Rgba>,
359    /// Border color for the referenced target anchor element(s) (when element is
360    /// anchor-positioned).
361    #[serde(
362        rename = "anchorBorderColor",
363        default,
364        skip_serializing_if = "Option::is_none"
365    )]
366    pub anchor_border_color: Option<crate::protocol::dom::Rgba>,
367    /// Background fill color for the referenced target anchor element(s) (when
368    /// element is anchor-positioned).
369    #[serde(
370        rename = "anchorBackgroundColor",
371        default,
372        skip_serializing_if = "Option::is_none"
373    )]
374    pub anchor_background_color: Option<crate::protocol::dom::Rgba>,
375    /// Whether to render the 3x3 position-area grid lines when position-area is
376    /// used.
377    #[serde(
378        rename = "showPositionAreaGrid",
379        default,
380        skip_serializing_if = "Option::is_none"
381    )]
382    pub show_position_area_grid: Option<bool>,
383    /// Line color for the 3x3 position-area grid lines.
384    #[serde(
385        rename = "positionAreaGridLineColor",
386        default,
387        skip_serializing_if = "Option::is_none"
388    )]
389    pub position_area_grid_line_color: Option<crate::protocol::dom::Rgba>,
390    /// Fill color for the active region within the position-area grid.
391    #[serde(
392        rename = "positionAreaActiveRegionColor",
393        default,
394        skip_serializing_if = "Option::is_none"
395    )]
396    pub position_area_active_region_color: Option<crate::protocol::dom::Rgba>,
397}
398
399/// Configuration data for the highlighting of page elements.
400#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
401pub struct HighlightConfig {
402    /// Whether the node info tooltip should be shown (default: false).
403    #[serde(rename = "showInfo", default, skip_serializing_if = "Option::is_none")]
404    pub show_info: Option<bool>,
405    /// Whether the node styles in the tooltip (default: false).
406    #[serde(
407        rename = "showStyles",
408        default,
409        skip_serializing_if = "Option::is_none"
410    )]
411    pub show_styles: Option<bool>,
412    /// Whether the rulers should be shown (default: false).
413    #[serde(
414        rename = "showRulers",
415        default,
416        skip_serializing_if = "Option::is_none"
417    )]
418    pub show_rulers: Option<bool>,
419    /// Whether the a11y info should be shown (default: true).
420    #[serde(
421        rename = "showAccessibilityInfo",
422        default,
423        skip_serializing_if = "Option::is_none"
424    )]
425    pub show_accessibility_info: Option<bool>,
426    /// Whether the extension lines from node to the rulers should be shown
427    /// (default: false).
428    #[serde(
429        rename = "showExtensionLines",
430        default,
431        skip_serializing_if = "Option::is_none"
432    )]
433    pub show_extension_lines: Option<bool>,
434    /// The content box highlight fill color (default: transparent).
435    #[serde(
436        rename = "contentColor",
437        default,
438        skip_serializing_if = "Option::is_none"
439    )]
440    pub content_color: Option<crate::protocol::dom::Rgba>,
441    /// The padding highlight fill color (default: transparent).
442    #[serde(
443        rename = "paddingColor",
444        default,
445        skip_serializing_if = "Option::is_none"
446    )]
447    pub padding_color: Option<crate::protocol::dom::Rgba>,
448    /// The border highlight fill color (default: transparent).
449    #[serde(
450        rename = "borderColor",
451        default,
452        skip_serializing_if = "Option::is_none"
453    )]
454    pub border_color: Option<crate::protocol::dom::Rgba>,
455    /// The margin highlight fill color (default: transparent).
456    #[serde(
457        rename = "marginColor",
458        default,
459        skip_serializing_if = "Option::is_none"
460    )]
461    pub margin_color: Option<crate::protocol::dom::Rgba>,
462    /// The event target element highlight fill color (default: transparent).
463    #[serde(
464        rename = "eventTargetColor",
465        default,
466        skip_serializing_if = "Option::is_none"
467    )]
468    pub event_target_color: Option<crate::protocol::dom::Rgba>,
469    /// The shape outside fill color (default: transparent).
470    #[serde(
471        rename = "shapeColor",
472        default,
473        skip_serializing_if = "Option::is_none"
474    )]
475    pub shape_color: Option<crate::protocol::dom::Rgba>,
476    /// The shape margin fill color (default: transparent).
477    #[serde(
478        rename = "shapeMarginColor",
479        default,
480        skip_serializing_if = "Option::is_none"
481    )]
482    pub shape_margin_color: Option<crate::protocol::dom::Rgba>,
483    /// The grid layout color (default: transparent).
484    #[serde(
485        rename = "cssGridColor",
486        default,
487        skip_serializing_if = "Option::is_none"
488    )]
489    pub css_grid_color: Option<crate::protocol::dom::Rgba>,
490    /// The color format used to format color styles (default: hex).
491    #[serde(
492        rename = "colorFormat",
493        default,
494        skip_serializing_if = "Option::is_none"
495    )]
496    pub color_format: Option<ColorFormat>,
497    /// The grid layout highlight configuration (default: all transparent).
498    #[serde(
499        rename = "gridHighlightConfig",
500        default,
501        skip_serializing_if = "Option::is_none"
502    )]
503    pub grid_highlight_config: Option<GridHighlightConfig>,
504    /// The flex container highlight configuration (default: all transparent).
505    #[serde(
506        rename = "flexContainerHighlightConfig",
507        default,
508        skip_serializing_if = "Option::is_none"
509    )]
510    pub flex_container_highlight_config: Option<FlexContainerHighlightConfig>,
511    /// The flex item highlight configuration (default: all transparent).
512    #[serde(
513        rename = "flexItemHighlightConfig",
514        default,
515        skip_serializing_if = "Option::is_none"
516    )]
517    pub flex_item_highlight_config: Option<FlexItemHighlightConfig>,
518    /// The contrast algorithm to use for the contrast ratio (default: aa).
519    #[serde(
520        rename = "contrastAlgorithm",
521        default,
522        skip_serializing_if = "Option::is_none"
523    )]
524    pub contrast_algorithm: Option<ContrastAlgorithm>,
525    /// The container query container highlight configuration (default: all
526    /// transparent).
527    #[serde(
528        rename = "containerQueryContainerHighlightConfig",
529        default,
530        skip_serializing_if = "Option::is_none"
531    )]
532    pub container_query_container_highlight_config: Option<ContainerQueryContainerHighlightConfig>,
533    /// The IMCB highlight configuration (default: all transparent).
534    #[serde(
535        rename = "imcbHighlightConfig",
536        default,
537        skip_serializing_if = "Option::is_none"
538    )]
539    pub imcb_highlight_config: Option<ImcbHighlightConfig>,
540}
541
542#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
543pub enum ColorFormat {
544    /// `rgb`
545    #[serde(rename = "rgb")]
546    Rgb,
547    /// `hsl`
548    #[serde(rename = "hsl")]
549    Hsl,
550    /// `hwb`
551    #[serde(rename = "hwb")]
552    Hwb,
553    /// `hex`
554    #[serde(rename = "hex")]
555    Hex,
556    /// A value this vendored schema does not list. Chrome adds values ahead of
557    /// the published protocol, so an unrecognised one is kept as it arrived
558    /// rather than failing the payload it came in.
559    #[serde(untagged)]
560    Unrecognized(String),
561}
562
563/// Configurations for Persistent Grid Highlight
564#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
565pub struct GridNodeHighlightConfig {
566    /// A descriptor for the highlight appearance.
567    #[serde(rename = "gridHighlightConfig")]
568    pub grid_highlight_config: GridHighlightConfig,
569    /// Identifier of the node to highlight.
570    #[serde(rename = "nodeId")]
571    pub node_id: crate::protocol::dom::NodeId,
572}
573
574#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
575pub struct FlexNodeHighlightConfig {
576    /// A descriptor for the highlight appearance of flex containers.
577    #[serde(rename = "flexContainerHighlightConfig")]
578    pub flex_container_highlight_config: FlexContainerHighlightConfig,
579    /// Identifier of the node to highlight.
580    #[serde(rename = "nodeId")]
581    pub node_id: crate::protocol::dom::NodeId,
582}
583
584#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
585pub struct ScrollSnapContainerHighlightConfig {
586    /// The style of the snapport border (default: transparent)
587    #[serde(
588        rename = "snapportBorder",
589        default,
590        skip_serializing_if = "Option::is_none"
591    )]
592    pub snapport_border: Option<LineStyle>,
593    /// The style of the snap area border (default: transparent)
594    #[serde(
595        rename = "snapAreaBorder",
596        default,
597        skip_serializing_if = "Option::is_none"
598    )]
599    pub snap_area_border: Option<LineStyle>,
600    /// The margin highlight fill color (default: transparent).
601    #[serde(
602        rename = "scrollMarginColor",
603        default,
604        skip_serializing_if = "Option::is_none"
605    )]
606    pub scroll_margin_color: Option<crate::protocol::dom::Rgba>,
607    /// The padding highlight fill color (default: transparent).
608    #[serde(
609        rename = "scrollPaddingColor",
610        default,
611        skip_serializing_if = "Option::is_none"
612    )]
613    pub scroll_padding_color: Option<crate::protocol::dom::Rgba>,
614}
615
616#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
617pub struct ScrollSnapHighlightConfig {
618    /// A descriptor for the highlight appearance of scroll snap containers.
619    #[serde(rename = "scrollSnapContainerHighlightConfig")]
620    pub scroll_snap_container_highlight_config: ScrollSnapContainerHighlightConfig,
621    /// Identifier of the node to highlight.
622    #[serde(rename = "nodeId")]
623    pub node_id: crate::protocol::dom::NodeId,
624}
625
626/// Configuration for dual screen hinge
627#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
628pub struct HingeConfig {
629    /// A rectangle represent hinge
630    pub rect: crate::protocol::dom::Rect,
631    /// The content box highlight fill color (default: a dark color).
632    #[serde(
633        rename = "contentColor",
634        default,
635        skip_serializing_if = "Option::is_none"
636    )]
637    pub content_color: Option<crate::protocol::dom::Rgba>,
638    /// The content box highlight outline color (default: transparent).
639    #[serde(
640        rename = "outlineColor",
641        default,
642        skip_serializing_if = "Option::is_none"
643    )]
644    pub outline_color: Option<crate::protocol::dom::Rgba>,
645}
646
647/// Supported display cutout shapes.
648#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
649pub enum DisplayCutoutShape {
650    /// `pill`
651    #[serde(rename = "pill")]
652    Pill,
653    /// `notch`
654    #[serde(rename = "notch")]
655    Notch,
656    /// `circle`
657    #[serde(rename = "circle")]
658    Circle,
659    /// `rectangle`
660    #[serde(rename = "rectangle")]
661    Rectangle,
662    /// A value this vendored schema does not list. Chrome adds values ahead of
663    /// the published protocol, so an unrecognised one is kept as it arrived
664    /// rather than failing the payload it came in.
665    #[serde(untagged)]
666    Unrecognized(String),
667}
668
669/// Configuration for a display cutout.
670#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
671pub struct DisplayCutoutConfig {
672    /// A rectangle representing the cutout bounds.
673    pub rect: crate::protocol::dom::Rect,
674    /// Shape used to draw the cutout.
675    pub shape: DisplayCutoutShape,
676    /// Border radius for rounded cutout shapes.
677    #[serde(
678        rename = "borderRadius",
679        default,
680        skip_serializing_if = "Option::is_none"
681    )]
682    pub border_radius: Option<i64>,
683    /// Upper shoulder radius for notch cutout shapes.
684    #[serde(
685        rename = "upperRadius",
686        default,
687        skip_serializing_if = "Option::is_none"
688    )]
689    pub upper_radius: Option<i64>,
690    /// Lower transition radius for notch cutout shapes.
691    #[serde(
692        rename = "lowerRadius",
693        default,
694        skip_serializing_if = "Option::is_none"
695    )]
696    pub lower_radius: Option<i64>,
697    /// Center x coordinate for circle cutout shapes.
698    #[serde(default, skip_serializing_if = "Option::is_none")]
699    pub cx: Option<i64>,
700    /// Center y coordinate for circle cutout shapes.
701    #[serde(default, skip_serializing_if = "Option::is_none")]
702    pub cy: Option<i64>,
703    /// Radius for circle cutout shapes.
704    #[serde(default, skip_serializing_if = "Option::is_none")]
705    pub radius: Option<i64>,
706    /// The cutout fill color (default: black).
707    #[serde(
708        rename = "contentColor",
709        default,
710        skip_serializing_if = "Option::is_none"
711    )]
712    pub content_color: Option<crate::protocol::dom::Rgba>,
713}
714
715/// Configuration for Window Controls Overlay
716#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
717pub struct WindowControlsOverlayConfig {
718    /// Whether the title bar CSS should be shown when emulating the Window
719    /// Controls Overlay.
720    #[serde(rename = "showCSS")]
721    pub show_css: bool,
722    /// Selected platforms to show the overlay.
723    #[serde(rename = "selectedPlatform")]
724    pub selected_platform: String,
725    /// The theme color defined in app manifest.
726    #[serde(rename = "themeColor")]
727    pub theme_color: String,
728}
729
730#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
731pub struct ContainerQueryHighlightConfig {
732    /// A descriptor for the highlight appearance of container query containers.
733    #[serde(rename = "containerQueryContainerHighlightConfig")]
734    pub container_query_container_highlight_config: ContainerQueryContainerHighlightConfig,
735    /// Identifier of the container node to highlight.
736    #[serde(rename = "nodeId")]
737    pub node_id: crate::protocol::dom::NodeId,
738}
739
740#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
741pub struct ContainerQueryContainerHighlightConfig {
742    /// The style of the container border.
743    #[serde(
744        rename = "containerBorder",
745        default,
746        skip_serializing_if = "Option::is_none"
747    )]
748    pub container_border: Option<LineStyle>,
749    /// The style of the descendants' borders.
750    #[serde(
751        rename = "descendantBorder",
752        default,
753        skip_serializing_if = "Option::is_none"
754    )]
755    pub descendant_border: Option<LineStyle>,
756}
757
758#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
759pub struct IsolatedElementHighlightConfig {
760    /// A descriptor for the highlight appearance of an element in isolation mode.
761    #[serde(rename = "isolationModeHighlightConfig")]
762    pub isolation_mode_highlight_config: IsolationModeHighlightConfig,
763    /// Identifier of the isolated element to highlight.
764    #[serde(rename = "nodeId")]
765    pub node_id: crate::protocol::dom::NodeId,
766}
767
768#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
769pub struct IsolationModeHighlightConfig {
770    /// The fill color of the resizers (default: transparent).
771    #[serde(
772        rename = "resizerColor",
773        default,
774        skip_serializing_if = "Option::is_none"
775    )]
776    pub resizer_color: Option<crate::protocol::dom::Rgba>,
777    /// The fill color for resizer handles (default: transparent).
778    #[serde(
779        rename = "resizerHandleColor",
780        default,
781        skip_serializing_if = "Option::is_none"
782    )]
783    pub resizer_handle_color: Option<crate::protocol::dom::Rgba>,
784    /// The fill color for the mask covering non-isolated elements (default:
785    /// transparent).
786    #[serde(rename = "maskColor", default, skip_serializing_if = "Option::is_none")]
787    pub mask_color: Option<crate::protocol::dom::Rgba>,
788}
789
790#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
791pub enum InspectMode {
792    /// `searchForNode`
793    #[serde(rename = "searchForNode")]
794    SearchForNode,
795    /// `searchForUAShadowDOM`
796    #[serde(rename = "searchForUAShadowDOM")]
797    SearchForUaShadowDom,
798    /// `captureAreaScreenshot`
799    #[serde(rename = "captureAreaScreenshot")]
800    CaptureAreaScreenshot,
801    /// `none`
802    #[serde(rename = "none")]
803    None,
804    /// A value this vendored schema does not list. Chrome adds values ahead of
805    /// the published protocol, so an unrecognised one is kept as it arrived
806    /// rather than failing the payload it came in.
807    #[serde(untagged)]
808    Unrecognized(String),
809}
810
811#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
812pub struct InspectedElementAnchorConfig {
813    /// Identifier of the node to highlight.
814    #[serde(rename = "nodeId", default, skip_serializing_if = "Option::is_none")]
815    pub node_id: Option<crate::protocol::dom::NodeId>,
816    /// Identifier of the backend node to highlight.
817    #[serde(
818        rename = "backendNodeId",
819        default,
820        skip_serializing_if = "Option::is_none"
821    )]
822    pub backend_node_id: Option<crate::protocol::dom::BackendNodeId>,
823}
824
825/// Disables domain notifications.
826///
827/// Parameters of `Overlay.disable`.
828#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
829pub struct DisableParams {}
830
831impl crate::typed::Command for DisableParams {
832    const METHOD: &'static str = "Overlay.disable";
833    type Returns = crate::typed::NoReturns;
834}
835
836/// Enables domain notifications.
837///
838/// Parameters of `Overlay.enable`.
839#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
840pub struct EnableParams {}
841
842impl crate::typed::Command for EnableParams {
843    const METHOD: &'static str = "Overlay.enable";
844    type Returns = crate::typed::NoReturns;
845}
846
847/// For testing.
848///
849/// Parameters of `Overlay.getHighlightObjectForTest`.
850#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
851pub struct GetHighlightObjectForTestParams {
852    /// Id of the node to get highlight object for.
853    #[serde(rename = "nodeId")]
854    pub node_id: crate::protocol::dom::NodeId,
855    /// Whether to include distance info.
856    #[serde(
857        rename = "includeDistance",
858        default,
859        skip_serializing_if = "Option::is_none"
860    )]
861    pub include_distance: Option<bool>,
862    /// Whether to include style info.
863    #[serde(
864        rename = "includeStyle",
865        default,
866        skip_serializing_if = "Option::is_none"
867    )]
868    pub include_style: Option<bool>,
869    /// The color format to get config with (default: hex).
870    #[serde(
871        rename = "colorFormat",
872        default,
873        skip_serializing_if = "Option::is_none"
874    )]
875    pub color_format: Option<ColorFormat>,
876    /// Whether to show accessibility info (default: true).
877    #[serde(
878        rename = "showAccessibilityInfo",
879        default,
880        skip_serializing_if = "Option::is_none"
881    )]
882    pub show_accessibility_info: Option<bool>,
883}
884
885/// What `Overlay.getHighlightObjectForTest` answers with.
886#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
887pub struct GetHighlightObjectForTestReturns {
888    /// Highlight data for the node.
889    pub highlight: serde_json::Value,
890}
891
892impl crate::typed::Command for GetHighlightObjectForTestParams {
893    const METHOD: &'static str = "Overlay.getHighlightObjectForTest";
894    type Returns = GetHighlightObjectForTestReturns;
895}
896
897/// For Persistent Grid testing.
898///
899/// Parameters of `Overlay.getGridHighlightObjectsForTest`.
900#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
901pub struct GetGridHighlightObjectsForTestParams {
902    /// Ids of the node to get highlight object for.
903    #[serde(rename = "nodeIds")]
904    pub node_ids: Vec<crate::protocol::dom::NodeId>,
905}
906
907/// What `Overlay.getGridHighlightObjectsForTest` answers with.
908#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
909pub struct GetGridHighlightObjectsForTestReturns {
910    /// Grid Highlight data for the node ids provided.
911    pub highlights: serde_json::Value,
912}
913
914impl crate::typed::Command for GetGridHighlightObjectsForTestParams {
915    const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest";
916    type Returns = GetGridHighlightObjectsForTestReturns;
917}
918
919/// For Source Order Viewer testing.
920///
921/// Parameters of `Overlay.getSourceOrderHighlightObjectForTest`.
922#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
923pub struct GetSourceOrderHighlightObjectForTestParams {
924    /// Id of the node to highlight.
925    #[serde(rename = "nodeId")]
926    pub node_id: crate::protocol::dom::NodeId,
927}
928
929/// What `Overlay.getSourceOrderHighlightObjectForTest` answers with.
930#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
931pub struct GetSourceOrderHighlightObjectForTestReturns {
932    /// Source order highlight data for the node id provided.
933    pub highlight: serde_json::Value,
934}
935
936impl crate::typed::Command for GetSourceOrderHighlightObjectForTestParams {
937    const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest";
938    type Returns = GetSourceOrderHighlightObjectForTestReturns;
939}
940
941/// Hides any highlight.
942///
943/// Parameters of `Overlay.hideHighlight`.
944#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
945pub struct HideHighlightParams {}
946
947impl crate::typed::Command for HideHighlightParams {
948    const METHOD: &'static str = "Overlay.hideHighlight";
949    type Returns = crate::typed::NoReturns;
950}
951
952/// Highlights owner element of the frame with given id. Deprecated: Doesn't
953/// work reliably and cannot be fixed due to process separation (the owner
954/// node might be in a different process). Determine the owner node in the
955/// client and use highlightNode.
956///
957/// Deprecated in the protocol.
958///
959/// Parameters of `Overlay.highlightFrame`.
960#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
961pub struct HighlightFrameParams {
962    /// Identifier of the frame to highlight.
963    #[serde(rename = "frameId")]
964    pub frame_id: crate::protocol::page::FrameId,
965    /// The content box highlight fill color (default: transparent).
966    #[serde(
967        rename = "contentColor",
968        default,
969        skip_serializing_if = "Option::is_none"
970    )]
971    pub content_color: Option<crate::protocol::dom::Rgba>,
972    /// The content box highlight outline color (default: transparent).
973    #[serde(
974        rename = "contentOutlineColor",
975        default,
976        skip_serializing_if = "Option::is_none"
977    )]
978    pub content_outline_color: Option<crate::protocol::dom::Rgba>,
979}
980
981impl crate::typed::Command for HighlightFrameParams {
982    const METHOD: &'static str = "Overlay.highlightFrame";
983    type Returns = crate::typed::NoReturns;
984}
985
986/// Highlights DOM node with given id or with the given JavaScript object
987/// wrapper. Either nodeId or objectId must be specified.
988///
989/// Parameters of `Overlay.highlightNode`.
990#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
991pub struct HighlightNodeParams {
992    /// A descriptor for the highlight appearance.
993    #[serde(rename = "highlightConfig")]
994    pub highlight_config: HighlightConfig,
995    /// Identifier of the node to highlight.
996    #[serde(rename = "nodeId", default, skip_serializing_if = "Option::is_none")]
997    pub node_id: Option<crate::protocol::dom::NodeId>,
998    /// Identifier of the backend node to highlight.
999    #[serde(
1000        rename = "backendNodeId",
1001        default,
1002        skip_serializing_if = "Option::is_none"
1003    )]
1004    pub backend_node_id: Option<crate::protocol::dom::BackendNodeId>,
1005    /// JavaScript object id of the node to be highlighted.
1006    #[serde(rename = "objectId", default, skip_serializing_if = "Option::is_none")]
1007    pub object_id: Option<crate::protocol::runtime::RemoteObjectId>,
1008    /// Selectors to highlight relevant nodes.
1009    #[serde(default, skip_serializing_if = "Option::is_none")]
1010    pub selector: Option<String>,
1011}
1012
1013impl crate::typed::Command for HighlightNodeParams {
1014    const METHOD: &'static str = "Overlay.highlightNode";
1015    type Returns = crate::typed::NoReturns;
1016}
1017
1018/// Highlights given quad. Coordinates are absolute with respect to the main
1019/// frame viewport.
1020///
1021/// Parameters of `Overlay.highlightQuad`.
1022#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1023pub struct HighlightQuadParams {
1024    /// Quad to highlight
1025    pub quad: crate::protocol::dom::Quad,
1026    /// The highlight fill color (default: transparent).
1027    #[serde(default, skip_serializing_if = "Option::is_none")]
1028    pub color: Option<crate::protocol::dom::Rgba>,
1029    /// The highlight outline color (default: transparent).
1030    #[serde(
1031        rename = "outlineColor",
1032        default,
1033        skip_serializing_if = "Option::is_none"
1034    )]
1035    pub outline_color: Option<crate::protocol::dom::Rgba>,
1036}
1037
1038impl crate::typed::Command for HighlightQuadParams {
1039    const METHOD: &'static str = "Overlay.highlightQuad";
1040    type Returns = crate::typed::NoReturns;
1041}
1042
1043/// Highlights given rectangle. Coordinates are absolute with respect to the
1044/// main frame viewport. Issue: the method does not handle device pixel ratio
1045/// (DPR) correctly. The coordinates currently have to be adjusted by the
1046/// client if DPR is not 1 (see crbug.com/437807128).
1047///
1048/// Parameters of `Overlay.highlightRect`.
1049#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1050pub struct HighlightRectParams {
1051    /// X coordinate
1052    pub x: i64,
1053    /// Y coordinate
1054    pub y: i64,
1055    /// Rectangle width
1056    pub width: i64,
1057    /// Rectangle height
1058    pub height: i64,
1059    /// The highlight fill color (default: transparent).
1060    #[serde(default, skip_serializing_if = "Option::is_none")]
1061    pub color: Option<crate::protocol::dom::Rgba>,
1062    /// The highlight outline color (default: transparent).
1063    #[serde(
1064        rename = "outlineColor",
1065        default,
1066        skip_serializing_if = "Option::is_none"
1067    )]
1068    pub outline_color: Option<crate::protocol::dom::Rgba>,
1069}
1070
1071impl crate::typed::Command for HighlightRectParams {
1072    const METHOD: &'static str = "Overlay.highlightRect";
1073    type Returns = crate::typed::NoReturns;
1074}
1075
1076/// Highlights the source order of the children of the DOM node with given id
1077/// or with the given JavaScript object wrapper. Either nodeId or objectId
1078/// must be specified.
1079///
1080/// Parameters of `Overlay.highlightSourceOrder`.
1081#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1082pub struct HighlightSourceOrderParams {
1083    /// A descriptor for the appearance of the overlay drawing.
1084    #[serde(rename = "sourceOrderConfig")]
1085    pub source_order_config: SourceOrderConfig,
1086    /// Identifier of the node to highlight.
1087    #[serde(rename = "nodeId", default, skip_serializing_if = "Option::is_none")]
1088    pub node_id: Option<crate::protocol::dom::NodeId>,
1089    /// Identifier of the backend node to highlight.
1090    #[serde(
1091        rename = "backendNodeId",
1092        default,
1093        skip_serializing_if = "Option::is_none"
1094    )]
1095    pub backend_node_id: Option<crate::protocol::dom::BackendNodeId>,
1096    /// JavaScript object id of the node to be highlighted.
1097    #[serde(rename = "objectId", default, skip_serializing_if = "Option::is_none")]
1098    pub object_id: Option<crate::protocol::runtime::RemoteObjectId>,
1099}
1100
1101impl crate::typed::Command for HighlightSourceOrderParams {
1102    const METHOD: &'static str = "Overlay.highlightSourceOrder";
1103    type Returns = crate::typed::NoReturns;
1104}
1105
1106/// Enters the 'inspect' mode. In this mode, elements that user is hovering
1107/// over are highlighted. Backend then generates 'inspectNodeRequested' event
1108/// upon element selection.
1109///
1110/// Parameters of `Overlay.setInspectMode`.
1111#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1112pub struct SetInspectModeParams {
1113    /// Set an inspection mode.
1114    pub mode: InspectMode,
1115    /// A descriptor for the highlight appearance of hovered-over nodes. May be
1116    /// omitted if `enabled == false`.
1117    #[serde(
1118        rename = "highlightConfig",
1119        default,
1120        skip_serializing_if = "Option::is_none"
1121    )]
1122    pub highlight_config: Option<HighlightConfig>,
1123}
1124
1125impl crate::typed::Command for SetInspectModeParams {
1126    const METHOD: &'static str = "Overlay.setInspectMode";
1127    type Returns = crate::typed::NoReturns;
1128}
1129
1130/// Highlights owner element of all frames detected to be ads.
1131///
1132/// Parameters of `Overlay.setShowAdHighlights`.
1133#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1134pub struct SetShowAdHighlightsParams {
1135    /// True for showing ad highlights
1136    pub show: bool,
1137}
1138
1139impl crate::typed::Command for SetShowAdHighlightsParams {
1140    const METHOD: &'static str = "Overlay.setShowAdHighlights";
1141    type Returns = crate::typed::NoReturns;
1142}
1143
1144/// Parameters of `Overlay.setPausedInDebuggerMessage`.
1145#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1146pub struct SetPausedInDebuggerMessageParams {
1147    /// The message to display, also triggers resume and step over controls.
1148    #[serde(default, skip_serializing_if = "Option::is_none")]
1149    pub message: Option<String>,
1150}
1151
1152impl crate::typed::Command for SetPausedInDebuggerMessageParams {
1153    const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage";
1154    type Returns = crate::typed::NoReturns;
1155}
1156
1157/// Requests that backend shows debug borders on layers
1158///
1159/// Parameters of `Overlay.setShowDebugBorders`.
1160#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1161pub struct SetShowDebugBordersParams {
1162    /// True for showing debug borders
1163    pub show: bool,
1164}
1165
1166impl crate::typed::Command for SetShowDebugBordersParams {
1167    const METHOD: &'static str = "Overlay.setShowDebugBorders";
1168    type Returns = crate::typed::NoReturns;
1169}
1170
1171/// Requests that backend shows the FPS counter
1172///
1173/// Parameters of `Overlay.setShowFPSCounter`.
1174#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1175pub struct SetShowFpsCounterParams {
1176    /// True for showing the FPS counter
1177    pub show: bool,
1178}
1179
1180impl crate::typed::Command for SetShowFpsCounterParams {
1181    const METHOD: &'static str = "Overlay.setShowFPSCounter";
1182    type Returns = crate::typed::NoReturns;
1183}
1184
1185/// Highlight multiple elements with the CSS Grid overlay.
1186///
1187/// Parameters of `Overlay.setShowGridOverlays`.
1188#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1189pub struct SetShowGridOverlaysParams {
1190    /// An array of node identifiers and descriptors for the highlight appearance.
1191    #[serde(rename = "gridNodeHighlightConfigs")]
1192    pub grid_node_highlight_configs: Vec<GridNodeHighlightConfig>,
1193}
1194
1195impl crate::typed::Command for SetShowGridOverlaysParams {
1196    const METHOD: &'static str = "Overlay.setShowGridOverlays";
1197    type Returns = crate::typed::NoReturns;
1198}
1199
1200/// Parameters of `Overlay.setShowFlexOverlays`.
1201#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1202pub struct SetShowFlexOverlaysParams {
1203    /// An array of node identifiers and descriptors for the highlight appearance.
1204    #[serde(rename = "flexNodeHighlightConfigs")]
1205    pub flex_node_highlight_configs: Vec<FlexNodeHighlightConfig>,
1206}
1207
1208impl crate::typed::Command for SetShowFlexOverlaysParams {
1209    const METHOD: &'static str = "Overlay.setShowFlexOverlays";
1210    type Returns = crate::typed::NoReturns;
1211}
1212
1213/// Parameters of `Overlay.setShowScrollSnapOverlays`.
1214#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1215pub struct SetShowScrollSnapOverlaysParams {
1216    /// An array of node identifiers and descriptors for the highlight appearance.
1217    #[serde(rename = "scrollSnapHighlightConfigs")]
1218    pub scroll_snap_highlight_configs: Vec<ScrollSnapHighlightConfig>,
1219}
1220
1221impl crate::typed::Command for SetShowScrollSnapOverlaysParams {
1222    const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays";
1223    type Returns = crate::typed::NoReturns;
1224}
1225
1226/// Parameters of `Overlay.setShowContainerQueryOverlays`.
1227#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1228pub struct SetShowContainerQueryOverlaysParams {
1229    /// An array of node identifiers and descriptors for the highlight appearance.
1230    #[serde(rename = "containerQueryHighlightConfigs")]
1231    pub container_query_highlight_configs: Vec<ContainerQueryHighlightConfig>,
1232}
1233
1234impl crate::typed::Command for SetShowContainerQueryOverlaysParams {
1235    const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays";
1236    type Returns = crate::typed::NoReturns;
1237}
1238
1239/// Parameters of `Overlay.setShowInspectedElementAnchor`.
1240#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1241pub struct SetShowInspectedElementAnchorParams {
1242    /// Node identifier for which to show an anchor for.
1243    #[serde(rename = "inspectedElementAnchorConfig")]
1244    pub inspected_element_anchor_config: InspectedElementAnchorConfig,
1245}
1246
1247impl crate::typed::Command for SetShowInspectedElementAnchorParams {
1248    const METHOD: &'static str = "Overlay.setShowInspectedElementAnchor";
1249    type Returns = crate::typed::NoReturns;
1250}
1251
1252/// Requests that backend shows paint rectangles
1253///
1254/// Parameters of `Overlay.setShowPaintRects`.
1255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1256pub struct SetShowPaintRectsParams {
1257    /// True for showing paint rectangles
1258    pub result: bool,
1259}
1260
1261impl crate::typed::Command for SetShowPaintRectsParams {
1262    const METHOD: &'static str = "Overlay.setShowPaintRects";
1263    type Returns = crate::typed::NoReturns;
1264}
1265
1266/// Requests that backend shows layout shift regions
1267///
1268/// Parameters of `Overlay.setShowLayoutShiftRegions`.
1269#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1270pub struct SetShowLayoutShiftRegionsParams {
1271    /// True for showing layout shift regions
1272    pub result: bool,
1273}
1274
1275impl crate::typed::Command for SetShowLayoutShiftRegionsParams {
1276    const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions";
1277    type Returns = crate::typed::NoReturns;
1278}
1279
1280/// Requests that backend shows scroll bottleneck rects
1281///
1282/// Parameters of `Overlay.setShowScrollBottleneckRects`.
1283#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1284pub struct SetShowScrollBottleneckRectsParams {
1285    /// True for showing scroll bottleneck rects
1286    pub show: bool,
1287}
1288
1289impl crate::typed::Command for SetShowScrollBottleneckRectsParams {
1290    const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects";
1291    type Returns = crate::typed::NoReturns;
1292}
1293
1294/// Deprecated, no longer has any effect.
1295///
1296/// Deprecated in the protocol.
1297///
1298/// Parameters of `Overlay.setShowHitTestBorders`.
1299#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1300pub struct SetShowHitTestBordersParams {
1301    /// True for showing hit-test borders
1302    pub show: bool,
1303}
1304
1305impl crate::typed::Command for SetShowHitTestBordersParams {
1306    const METHOD: &'static str = "Overlay.setShowHitTestBorders";
1307    type Returns = crate::typed::NoReturns;
1308}
1309
1310/// Deprecated, no longer has any effect.
1311///
1312/// Deprecated in the protocol.
1313///
1314/// Parameters of `Overlay.setShowWebVitals`.
1315#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1316pub struct SetShowWebVitalsParams {
1317    pub show: bool,
1318}
1319
1320impl crate::typed::Command for SetShowWebVitalsParams {
1321    const METHOD: &'static str = "Overlay.setShowWebVitals";
1322    type Returns = crate::typed::NoReturns;
1323}
1324
1325/// Paints viewport size upon main frame resize.
1326///
1327/// Parameters of `Overlay.setShowViewportSizeOnResize`.
1328#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1329pub struct SetShowViewportSizeOnResizeParams {
1330    /// Whether to paint size or not.
1331    pub show: bool,
1332}
1333
1334impl crate::typed::Command for SetShowViewportSizeOnResizeParams {
1335    const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize";
1336    type Returns = crate::typed::NoReturns;
1337}
1338
1339/// Add a dual screen device hinge
1340///
1341/// Parameters of `Overlay.setShowHinge`.
1342#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1343pub struct SetShowHingeParams {
1344    /// hinge data, null means hideHinge
1345    #[serde(
1346        rename = "hingeConfig",
1347        default,
1348        skip_serializing_if = "Option::is_none"
1349    )]
1350    pub hinge_config: Option<HingeConfig>,
1351}
1352
1353impl crate::typed::Command for SetShowHingeParams {
1354    const METHOD: &'static str = "Overlay.setShowHinge";
1355    type Returns = crate::typed::NoReturns;
1356}
1357
1358/// Add a display cutout overlay.
1359///
1360/// Parameters of `Overlay.setShowDisplayCutout`.
1361#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1362pub struct SetShowDisplayCutoutParams {
1363    /// display cutout data, null means hide display cutout
1364    #[serde(
1365        rename = "displayCutoutConfig",
1366        default,
1367        skip_serializing_if = "Option::is_none"
1368    )]
1369    pub display_cutout_config: Option<DisplayCutoutConfig>,
1370}
1371
1372impl crate::typed::Command for SetShowDisplayCutoutParams {
1373    const METHOD: &'static str = "Overlay.setShowDisplayCutout";
1374    type Returns = crate::typed::NoReturns;
1375}
1376
1377/// Show elements in isolation mode with overlays.
1378///
1379/// Parameters of `Overlay.setShowIsolatedElements`.
1380#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1381pub struct SetShowIsolatedElementsParams {
1382    /// An array of node identifiers and descriptors for the highlight appearance.
1383    #[serde(rename = "isolatedElementHighlightConfigs")]
1384    pub isolated_element_highlight_configs: Vec<IsolatedElementHighlightConfig>,
1385}
1386
1387impl crate::typed::Command for SetShowIsolatedElementsParams {
1388    const METHOD: &'static str = "Overlay.setShowIsolatedElements";
1389    type Returns = crate::typed::NoReturns;
1390}
1391
1392/// Show Window Controls Overlay for PWA
1393///
1394/// Parameters of `Overlay.setShowWindowControlsOverlay`.
1395#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1396pub struct SetShowWindowControlsOverlayParams {
1397    /// Window Controls Overlay data, null means hide Window Controls Overlay
1398    #[serde(
1399        rename = "windowControlsOverlayConfig",
1400        default,
1401        skip_serializing_if = "Option::is_none"
1402    )]
1403    pub window_controls_overlay_config: Option<WindowControlsOverlayConfig>,
1404}
1405
1406impl crate::typed::Command for SetShowWindowControlsOverlayParams {
1407    const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay";
1408    type Returns = crate::typed::NoReturns;
1409}
1410
1411/// Fired when the node should be inspected. This happens after call to
1412/// `setInspectMode` or when user manually inspects an element.
1413///
1414/// Payload of the `Overlay.inspectNodeRequested` event.
1415#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1416pub struct InspectNodeRequestedEvent {
1417    /// Id of the node to inspect.
1418    #[serde(rename = "backendNodeId")]
1419    pub backend_node_id: crate::protocol::dom::BackendNodeId,
1420}
1421
1422impl crate::typed::Event for InspectNodeRequestedEvent {
1423    const METHOD: &'static str = "Overlay.inspectNodeRequested";
1424}
1425
1426/// Fired when the node should be highlighted. This happens after call to
1427/// `setInspectMode`.
1428///
1429/// Payload of the `Overlay.nodeHighlightRequested` event.
1430#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1431pub struct NodeHighlightRequestedEvent {
1432    #[serde(rename = "nodeId")]
1433    pub node_id: crate::protocol::dom::NodeId,
1434}
1435
1436impl crate::typed::Event for NodeHighlightRequestedEvent {
1437    const METHOD: &'static str = "Overlay.nodeHighlightRequested";
1438}
1439
1440/// Fired when user asks to capture screenshot of some area on the page.
1441///
1442/// Payload of the `Overlay.screenshotRequested` event.
1443#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1444pub struct ScreenshotRequestedEvent {
1445    /// Viewport to capture, in device independent pixels (dip).
1446    pub viewport: crate::protocol::page::Viewport,
1447}
1448
1449impl crate::typed::Event for ScreenshotRequestedEvent {
1450    const METHOD: &'static str = "Overlay.screenshotRequested";
1451}
1452
1453/// Fired when user asks to show the Inspect panel.
1454///
1455/// Payload of the `Overlay.inspectPanelShowRequested` event.
1456#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1457pub struct InspectPanelShowRequestedEvent {
1458    /// Id of the node to show in the panel.
1459    #[serde(rename = "backendNodeId")]
1460    pub backend_node_id: crate::protocol::dom::BackendNodeId,
1461}
1462
1463impl crate::typed::Event for InspectPanelShowRequestedEvent {
1464    const METHOD: &'static str = "Overlay.inspectPanelShowRequested";
1465}
1466
1467/// Fired when user asks to restore the Inspected Element floating window.
1468///
1469/// Payload of the `Overlay.inspectedElementWindowRestored` event.
1470#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1471pub struct InspectedElementWindowRestoredEvent {
1472    /// Id of the node to restore the floating window for.
1473    #[serde(rename = "backendNodeId")]
1474    pub backend_node_id: crate::protocol::dom::BackendNodeId,
1475}
1476
1477impl crate::typed::Event for InspectedElementWindowRestoredEvent {
1478    const METHOD: &'static str = "Overlay.inspectedElementWindowRestored";
1479}
1480
1481/// Fired when user cancels the inspect mode.
1482///
1483/// Payload of the `Overlay.inspectModeCanceled` event.
1484#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1485pub struct InspectModeCanceledEvent {}
1486
1487impl crate::typed::Event for InspectModeCanceledEvent {
1488    const METHOD: &'static str = "Overlay.inspectModeCanceled";
1489}