vendor/github.com/go-rod/rod/lib/proto/emulation.go
925 lines · 33145 bytes
1// This file is generated by "./lib/proto/generate"
2
3package proto
4
5/*
6
7Emulation
8
9This domain emulates different environments for the page.
10
11*/
12
13// EmulationScreenOrientationType enum.
14type EmulationScreenOrientationType string
15
16const (
17 // EmulationScreenOrientationTypePortraitPrimary enum const.
18 EmulationScreenOrientationTypePortraitPrimary EmulationScreenOrientationType = "portraitPrimary"
19
20 // EmulationScreenOrientationTypePortraitSecondary enum const.
21 EmulationScreenOrientationTypePortraitSecondary EmulationScreenOrientationType = "portraitSecondary"
22
23 // EmulationScreenOrientationTypeLandscapePrimary enum const.
24 EmulationScreenOrientationTypeLandscapePrimary EmulationScreenOrientationType = "landscapePrimary"
25
26 // EmulationScreenOrientationTypeLandscapeSecondary enum const.
27 EmulationScreenOrientationTypeLandscapeSecondary EmulationScreenOrientationType = "landscapeSecondary"
28)
29
30// EmulationScreenOrientation Screen orientation.
31type EmulationScreenOrientation struct {
32 // Type Orientation type.
33 Type EmulationScreenOrientationType `json:"type"`
34
35 // Angle Orientation angle.
36 Angle int `json:"angle"`
37}
38
39// EmulationDisplayFeatureOrientation enum.
40type EmulationDisplayFeatureOrientation string
41
42const (
43 // EmulationDisplayFeatureOrientationVertical enum const.
44 EmulationDisplayFeatureOrientationVertical EmulationDisplayFeatureOrientation = "vertical"
45
46 // EmulationDisplayFeatureOrientationHorizontal enum const.
47 EmulationDisplayFeatureOrientationHorizontal EmulationDisplayFeatureOrientation = "horizontal"
48)
49
50// EmulationDisplayFeature ...
51type EmulationDisplayFeature struct {
52 // Orientation of a display feature in relation to screen
53 Orientation EmulationDisplayFeatureOrientation `json:"orientation"`
54
55 // Offset The offset from the screen origin in either the x (for vertical
56 // orientation) or y (for horizontal orientation) direction.
57 Offset int `json:"offset"`
58
59 // MaskLength A display feature may mask content such that it is not physically
60 // displayed - this length along with the offset describes this area.
61 // A display feature that only splits content will have a 0 mask_length.
62 MaskLength int `json:"maskLength"`
63}
64
65// EmulationDevicePostureType enum.
66type EmulationDevicePostureType string
67
68const (
69 // EmulationDevicePostureTypeContinuous enum const.
70 EmulationDevicePostureTypeContinuous EmulationDevicePostureType = "continuous"
71
72 // EmulationDevicePostureTypeFolded enum const.
73 EmulationDevicePostureTypeFolded EmulationDevicePostureType = "folded"
74)
75
76// EmulationDevicePosture ...
77type EmulationDevicePosture struct {
78 // Type Current posture of the device
79 Type EmulationDevicePostureType `json:"type"`
80}
81
82// EmulationMediaFeature ...
83type EmulationMediaFeature struct {
84 // Name ...
85 Name string `json:"name"`
86
87 // Value ...
88 Value string `json:"value"`
89}
90
91// EmulationVirtualTimePolicy (experimental) advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
92// allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
93// pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
94// resource fetches.
95type EmulationVirtualTimePolicy string
96
97const (
98 // EmulationVirtualTimePolicyAdvance enum const.
99 EmulationVirtualTimePolicyAdvance EmulationVirtualTimePolicy = "advance"
100
101 // EmulationVirtualTimePolicyPause enum const.
102 EmulationVirtualTimePolicyPause EmulationVirtualTimePolicy = "pause"
103
104 // EmulationVirtualTimePolicyPauseIfNetworkFetchesPending enum const.
105 EmulationVirtualTimePolicyPauseIfNetworkFetchesPending EmulationVirtualTimePolicy = "pauseIfNetworkFetchesPending"
106)
107
108// EmulationUserAgentBrandVersion (experimental) Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
109type EmulationUserAgentBrandVersion struct {
110 // Brand ...
111 Brand string `json:"brand"`
112
113 // Version ...
114 Version string `json:"version"`
115}
116
117// EmulationUserAgentMetadata (experimental) Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
118// Missing optional values will be filled in by the target with what it would normally use.
119type EmulationUserAgentMetadata struct {
120 // Brands (optional) Brands appearing in Sec-CH-UA.
121 Brands []*EmulationUserAgentBrandVersion `json:"brands,omitempty"`
122
123 // FullVersionList (optional) Brands appearing in Sec-CH-UA-Full-Version-List.
124 FullVersionList []*EmulationUserAgentBrandVersion `json:"fullVersionList,omitempty"`
125
126 // FullVersion (deprecated) (optional) ...
127 FullVersion string `json:"fullVersion,omitempty"`
128
129 // Platform ...
130 Platform string `json:"platform"`
131
132 // PlatformVersion ...
133 PlatformVersion string `json:"platformVersion"`
134
135 // Architecture ...
136 Architecture string `json:"architecture"`
137
138 // Model ...
139 Model string `json:"model"`
140
141 // Mobile ...
142 Mobile bool `json:"mobile"`
143
144 // Bitness (optional) ...
145 Bitness string `json:"bitness,omitempty"`
146
147 // Wow64 (optional) ...
148 Wow64 bool `json:"wow64,omitempty"`
149}
150
151// EmulationSensorType (experimental) Used to specify sensor types to emulate.
152// See https://w3c.github.io/sensors/#automation for more information.
153type EmulationSensorType string
154
155const (
156 // EmulationSensorTypeAbsoluteOrientation enum const.
157 EmulationSensorTypeAbsoluteOrientation EmulationSensorType = "absolute-orientation"
158
159 // EmulationSensorTypeAccelerometer enum const.
160 EmulationSensorTypeAccelerometer EmulationSensorType = "accelerometer"
161
162 // EmulationSensorTypeAmbientLight enum const.
163 EmulationSensorTypeAmbientLight EmulationSensorType = "ambient-light"
164
165 // EmulationSensorTypeGravity enum const.
166 EmulationSensorTypeGravity EmulationSensorType = "gravity"
167
168 // EmulationSensorTypeGyroscope enum const.
169 EmulationSensorTypeGyroscope EmulationSensorType = "gyroscope"
170
171 // EmulationSensorTypeLinearAcceleration enum const.
172 EmulationSensorTypeLinearAcceleration EmulationSensorType = "linear-acceleration"
173
174 // EmulationSensorTypeMagnetometer enum const.
175 EmulationSensorTypeMagnetometer EmulationSensorType = "magnetometer"
176
177 // EmulationSensorTypeProximity enum const.
178 EmulationSensorTypeProximity EmulationSensorType = "proximity"
179
180 // EmulationSensorTypeRelativeOrientation enum const.
181 EmulationSensorTypeRelativeOrientation EmulationSensorType = "relative-orientation"
182)
183
184// EmulationSensorMetadata (experimental) ...
185type EmulationSensorMetadata struct {
186 // Available (optional) ...
187 Available bool `json:"available,omitempty"`
188
189 // MinimumFrequency (optional) ...
190 MinimumFrequency *float64 `json:"minimumFrequency,omitempty"`
191
192 // MaximumFrequency (optional) ...
193 MaximumFrequency *float64 `json:"maximumFrequency,omitempty"`
194}
195
196// EmulationSensorReadingSingle (experimental) ...
197type EmulationSensorReadingSingle struct {
198 // Value ...
199 Value float64 `json:"value"`
200}
201
202// EmulationSensorReadingXYZ (experimental) ...
203type EmulationSensorReadingXYZ struct {
204 // X ...
205 X float64 `json:"x"`
206
207 // Y ...
208 Y float64 `json:"y"`
209
210 // Z ...
211 Z float64 `json:"z"`
212}
213
214// EmulationSensorReadingQuaternion (experimental) ...
215type EmulationSensorReadingQuaternion struct {
216 // X ...
217 X float64 `json:"x"`
218
219 // Y ...
220 Y float64 `json:"y"`
221
222 // Z ...
223 Z float64 `json:"z"`
224
225 // W ...
226 W float64 `json:"w"`
227}
228
229// EmulationSensorReading (experimental) ...
230type EmulationSensorReading struct {
231 // Single (optional) ...
232 Single *EmulationSensorReadingSingle `json:"single,omitempty"`
233
234 // Xyz (optional) ...
235 Xyz *EmulationSensorReadingXYZ `json:"xyz,omitempty"`
236
237 // Quaternion (optional) ...
238 Quaternion *EmulationSensorReadingQuaternion `json:"quaternion,omitempty"`
239}
240
241// EmulationDisabledImageType (experimental) Enum of image types that can be disabled.
242type EmulationDisabledImageType string
243
244const (
245 // EmulationDisabledImageTypeAvif enum const.
246 EmulationDisabledImageTypeAvif EmulationDisabledImageType = "avif"
247
248 // EmulationDisabledImageTypeWebp enum const.
249 EmulationDisabledImageTypeWebp EmulationDisabledImageType = "webp"
250)
251
252// EmulationCanEmulate (deprecated) Tells whether emulation is supported.
253type EmulationCanEmulate struct{}
254
255// ProtoReq name.
256func (m EmulationCanEmulate) ProtoReq() string { return "Emulation.canEmulate" }
257
258// Call the request.
259func (m EmulationCanEmulate) Call(c Client) (*EmulationCanEmulateResult, error) {
260 var res EmulationCanEmulateResult
261 return &res, call(m.ProtoReq(), m, &res, c)
262}
263
264// EmulationCanEmulateResult (deprecated) ...
265type EmulationCanEmulateResult struct {
266 // Result True if emulation is supported.
267 Result bool `json:"result"`
268}
269
270// EmulationClearDeviceMetricsOverride Clears the overridden device metrics.
271type EmulationClearDeviceMetricsOverride struct{}
272
273// ProtoReq name.
274func (m EmulationClearDeviceMetricsOverride) ProtoReq() string {
275 return "Emulation.clearDeviceMetricsOverride"
276}
277
278// Call sends the request.
279func (m EmulationClearDeviceMetricsOverride) Call(c Client) error {
280 return call(m.ProtoReq(), m, nil, c)
281}
282
283// EmulationClearGeolocationOverride Clears the overridden Geolocation Position and Error.
284type EmulationClearGeolocationOverride struct{}
285
286// ProtoReq name.
287func (m EmulationClearGeolocationOverride) ProtoReq() string {
288 return "Emulation.clearGeolocationOverride"
289}
290
291// Call sends the request.
292func (m EmulationClearGeolocationOverride) Call(c Client) error {
293 return call(m.ProtoReq(), m, nil, c)
294}
295
296// EmulationResetPageScaleFactor (experimental) Requests that page scale factor is reset to initial values.
297type EmulationResetPageScaleFactor struct{}
298
299// ProtoReq name.
300func (m EmulationResetPageScaleFactor) ProtoReq() string { return "Emulation.resetPageScaleFactor" }
301
302// Call sends the request.
303func (m EmulationResetPageScaleFactor) Call(c Client) error {
304 return call(m.ProtoReq(), m, nil, c)
305}
306
307// EmulationSetFocusEmulationEnabled (experimental) Enables or disables simulating a focused and active page.
308type EmulationSetFocusEmulationEnabled struct {
309 // Enabled Whether to enable to disable focus emulation.
310 Enabled bool `json:"enabled"`
311}
312
313// ProtoReq name.
314func (m EmulationSetFocusEmulationEnabled) ProtoReq() string {
315 return "Emulation.setFocusEmulationEnabled"
316}
317
318// Call sends the request.
319func (m EmulationSetFocusEmulationEnabled) Call(c Client) error {
320 return call(m.ProtoReq(), m, nil, c)
321}
322
323// EmulationSetAutoDarkModeOverride (experimental) Automatically render all web contents using a dark theme.
324type EmulationSetAutoDarkModeOverride struct {
325 // Enabled (optional) Whether to enable or disable automatic dark mode.
326 // If not specified, any existing override will be cleared.
327 Enabled bool `json:"enabled,omitempty"`
328}
329
330// ProtoReq name.
331func (m EmulationSetAutoDarkModeOverride) ProtoReq() string {
332 return "Emulation.setAutoDarkModeOverride"
333}
334
335// Call sends the request.
336func (m EmulationSetAutoDarkModeOverride) Call(c Client) error {
337 return call(m.ProtoReq(), m, nil, c)
338}
339
340// EmulationSetCPUThrottlingRate Enables CPU throttling to emulate slow CPUs.
341type EmulationSetCPUThrottlingRate struct {
342 // Rate Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
343 Rate float64 `json:"rate"`
344}
345
346// ProtoReq name.
347func (m EmulationSetCPUThrottlingRate) ProtoReq() string { return "Emulation.setCPUThrottlingRate" }
348
349// Call sends the request.
350func (m EmulationSetCPUThrottlingRate) Call(c Client) error {
351 return call(m.ProtoReq(), m, nil, c)
352}
353
354// EmulationSetDefaultBackgroundColorOverride Sets or clears an override of the default background color of the frame. This override is used
355// if the content does not specify one.
356type EmulationSetDefaultBackgroundColorOverride struct {
357 // Color (optional) RGBA of the default background color. If not specified, any existing override will be
358 // cleared.
359 Color *DOMRGBA `json:"color,omitempty"`
360}
361
362// ProtoReq name.
363func (m EmulationSetDefaultBackgroundColorOverride) ProtoReq() string {
364 return "Emulation.setDefaultBackgroundColorOverride"
365}
366
367// Call sends the request.
368func (m EmulationSetDefaultBackgroundColorOverride) Call(c Client) error {
369 return call(m.ProtoReq(), m, nil, c)
370}
371
372// EmulationSetDeviceMetricsOverride Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
373// window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
374// query results).
375type EmulationSetDeviceMetricsOverride struct {
376 // Width Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
377 Width int `json:"width"`
378
379 // Height Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
380 Height int `json:"height"`
381
382 // DeviceScaleFactor Overriding device scale factor value. 0 disables the override.
383 DeviceScaleFactor float64 `json:"deviceScaleFactor"`
384
385 // Mobile Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
386 // autosizing and more.
387 Mobile bool `json:"mobile"`
388
389 // Scale (experimental) (optional) Scale to apply to resulting view image.
390 Scale *float64 `json:"scale,omitempty"`
391
392 // ScreenWidth (experimental) (optional) Overriding screen width value in pixels (minimum 0, maximum 10000000).
393 ScreenWidth *int `json:"screenWidth,omitempty"`
394
395 // ScreenHeight (experimental) (optional) Overriding screen height value in pixels (minimum 0, maximum 10000000).
396 ScreenHeight *int `json:"screenHeight,omitempty"`
397
398 // PositionX (experimental) (optional) Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
399 PositionX *int `json:"positionX,omitempty"`
400
401 // PositionY (experimental) (optional) Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
402 PositionY *int `json:"positionY,omitempty"`
403
404 // DontSetVisibleSize (experimental) (optional) Do not set visible view size, rely upon explicit setVisibleSize call.
405 DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"`
406
407 // ScreenOrientation (optional) Screen orientation override.
408 ScreenOrientation *EmulationScreenOrientation `json:"screenOrientation,omitempty"`
409
410 // Viewport (experimental) (optional) If set, the visible area of the page will be overridden to this viewport. This viewport
411 // change is not observed by the page, e.g. viewport-relative elements do not change positions.
412 Viewport *PageViewport `json:"viewport,omitempty"`
413
414 // DisplayFeature (experimental) (optional) If set, the display feature of a multi-segment screen. If not set, multi-segment support
415 // is turned-off.
416 DisplayFeature *EmulationDisplayFeature `json:"displayFeature,omitempty"`
417
418 // DevicePosture (deprecated) (experimental) (optional) If set, the posture of a foldable device. If not set the posture is set
419 // to continuous.
420 // Deprecated, use Emulation.setDevicePostureOverride.
421 DevicePosture *EmulationDevicePosture `json:"devicePosture,omitempty"`
422}
423
424// ProtoReq name.
425func (m EmulationSetDeviceMetricsOverride) ProtoReq() string {
426 return "Emulation.setDeviceMetricsOverride"
427}
428
429// Call sends the request.
430func (m EmulationSetDeviceMetricsOverride) Call(c Client) error {
431 return call(m.ProtoReq(), m, nil, c)
432}
433
434// EmulationSetDevicePostureOverride (experimental) Start reporting the given posture value to the Device Posture API.
435// This override can also be set in setDeviceMetricsOverride().
436type EmulationSetDevicePostureOverride struct {
437 // Posture ...
438 Posture *EmulationDevicePosture `json:"posture"`
439}
440
441// ProtoReq name.
442func (m EmulationSetDevicePostureOverride) ProtoReq() string {
443 return "Emulation.setDevicePostureOverride"
444}
445
446// Call sends the request.
447func (m EmulationSetDevicePostureOverride) Call(c Client) error {
448 return call(m.ProtoReq(), m, nil, c)
449}
450
451// EmulationClearDevicePostureOverride (experimental) Clears a device posture override set with either setDeviceMetricsOverride()
452// or setDevicePostureOverride() and starts using posture information from the
453// platform again.
454// Does nothing if no override is set.
455type EmulationClearDevicePostureOverride struct{}
456
457// ProtoReq name.
458func (m EmulationClearDevicePostureOverride) ProtoReq() string {
459 return "Emulation.clearDevicePostureOverride"
460}
461
462// Call sends the request.
463func (m EmulationClearDevicePostureOverride) Call(c Client) error {
464 return call(m.ProtoReq(), m, nil, c)
465}
466
467// EmulationSetScrollbarsHidden (experimental) ...
468type EmulationSetScrollbarsHidden struct {
469 // Hidden Whether scrollbars should be always hidden.
470 Hidden bool `json:"hidden"`
471}
472
473// ProtoReq name.
474func (m EmulationSetScrollbarsHidden) ProtoReq() string { return "Emulation.setScrollbarsHidden" }
475
476// Call sends the request.
477func (m EmulationSetScrollbarsHidden) Call(c Client) error {
478 return call(m.ProtoReq(), m, nil, c)
479}
480
481// EmulationSetDocumentCookieDisabled (experimental) ...
482type EmulationSetDocumentCookieDisabled struct {
483 // Disabled Whether document.coookie API should be disabled.
484 Disabled bool `json:"disabled"`
485}
486
487// ProtoReq name.
488func (m EmulationSetDocumentCookieDisabled) ProtoReq() string {
489 return "Emulation.setDocumentCookieDisabled"
490}
491
492// Call sends the request.
493func (m EmulationSetDocumentCookieDisabled) Call(c Client) error {
494 return call(m.ProtoReq(), m, nil, c)
495}
496
497// EmulationSetEmitTouchEventsForMouseConfiguration enum.
498type EmulationSetEmitTouchEventsForMouseConfiguration string
499
500const (
501 // EmulationSetEmitTouchEventsForMouseConfigurationMobile enum const.
502 EmulationSetEmitTouchEventsForMouseConfigurationMobile EmulationSetEmitTouchEventsForMouseConfiguration = "mobile"
503
504 // EmulationSetEmitTouchEventsForMouseConfigurationDesktop enum const.
505 EmulationSetEmitTouchEventsForMouseConfigurationDesktop EmulationSetEmitTouchEventsForMouseConfiguration = "desktop"
506)
507
508// EmulationSetEmitTouchEventsForMouse (experimental) ...
509type EmulationSetEmitTouchEventsForMouse struct {
510 // Enabled Whether touch emulation based on mouse input should be enabled.
511 Enabled bool `json:"enabled"`
512
513 // Configuration (optional) Touch/gesture events configuration. Default: current platform.
514 Configuration EmulationSetEmitTouchEventsForMouseConfiguration `json:"configuration,omitempty"`
515}
516
517// ProtoReq name.
518func (m EmulationSetEmitTouchEventsForMouse) ProtoReq() string {
519 return "Emulation.setEmitTouchEventsForMouse"
520}
521
522// Call sends the request.
523func (m EmulationSetEmitTouchEventsForMouse) Call(c Client) error {
524 return call(m.ProtoReq(), m, nil, c)
525}
526
527// EmulationSetEmulatedMedia Emulates the given media type or media feature for CSS media queries.
528type EmulationSetEmulatedMedia struct {
529 // Media (optional) Media type to emulate. Empty string disables the override.
530 Media string `json:"media,omitempty"`
531
532 // Features (optional) Media features to emulate.
533 Features []*EmulationMediaFeature `json:"features,omitempty"`
534}
535
536// ProtoReq name.
537func (m EmulationSetEmulatedMedia) ProtoReq() string { return "Emulation.setEmulatedMedia" }
538
539// Call sends the request.
540func (m EmulationSetEmulatedMedia) Call(c Client) error {
541 return call(m.ProtoReq(), m, nil, c)
542}
543
544// EmulationSetEmulatedVisionDeficiencyType enum.
545type EmulationSetEmulatedVisionDeficiencyType string
546
547const (
548 // EmulationSetEmulatedVisionDeficiencyTypeNone enum const.
549 EmulationSetEmulatedVisionDeficiencyTypeNone EmulationSetEmulatedVisionDeficiencyType = "none"
550
551 // EmulationSetEmulatedVisionDeficiencyTypeBlurredVision enum const.
552 EmulationSetEmulatedVisionDeficiencyTypeBlurredVision EmulationSetEmulatedVisionDeficiencyType = "blurredVision"
553
554 // EmulationSetEmulatedVisionDeficiencyTypeReducedContrast enum const.
555 EmulationSetEmulatedVisionDeficiencyTypeReducedContrast EmulationSetEmulatedVisionDeficiencyType = "reducedContrast"
556
557 // EmulationSetEmulatedVisionDeficiencyTypeAchromatopsia enum const.
558 EmulationSetEmulatedVisionDeficiencyTypeAchromatopsia EmulationSetEmulatedVisionDeficiencyType = "achromatopsia"
559
560 // EmulationSetEmulatedVisionDeficiencyTypeDeuteranopia enum const.
561 EmulationSetEmulatedVisionDeficiencyTypeDeuteranopia EmulationSetEmulatedVisionDeficiencyType = "deuteranopia"
562
563 // EmulationSetEmulatedVisionDeficiencyTypeProtanopia enum const.
564 EmulationSetEmulatedVisionDeficiencyTypeProtanopia EmulationSetEmulatedVisionDeficiencyType = "protanopia"
565
566 // EmulationSetEmulatedVisionDeficiencyTypeTritanopia enum const.
567 EmulationSetEmulatedVisionDeficiencyTypeTritanopia EmulationSetEmulatedVisionDeficiencyType = "tritanopia"
568)
569
570// EmulationSetEmulatedVisionDeficiency Emulates the given vision deficiency.
571type EmulationSetEmulatedVisionDeficiency struct {
572 // Type Vision deficiency to emulate. Order: best-effort emulations come first, followed by any
573 // physiologically accurate emulations for medically recognized color vision deficiencies.
574 Type EmulationSetEmulatedVisionDeficiencyType `json:"type"`
575}
576
577// ProtoReq name.
578func (m EmulationSetEmulatedVisionDeficiency) ProtoReq() string {
579 return "Emulation.setEmulatedVisionDeficiency"
580}
581
582// Call sends the request.
583func (m EmulationSetEmulatedVisionDeficiency) Call(c Client) error {
584 return call(m.ProtoReq(), m, nil, c)
585}
586
587// EmulationSetGeolocationOverride Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
588// unavailable.
589type EmulationSetGeolocationOverride struct {
590 // Latitude (optional) Mock latitude
591 Latitude *float64 `json:"latitude,omitempty"`
592
593 // Longitude (optional) Mock longitude
594 Longitude *float64 `json:"longitude,omitempty"`
595
596 // Accuracy (optional) Mock accuracy
597 Accuracy *float64 `json:"accuracy,omitempty"`
598}
599
600// ProtoReq name.
601func (m EmulationSetGeolocationOverride) ProtoReq() string { return "Emulation.setGeolocationOverride" }
602
603// Call sends the request.
604func (m EmulationSetGeolocationOverride) Call(c Client) error {
605 return call(m.ProtoReq(), m, nil, c)
606}
607
608// EmulationGetOverriddenSensorInformation (experimental) ...
609type EmulationGetOverriddenSensorInformation struct {
610 // Type ...
611 Type EmulationSensorType `json:"type"`
612}
613
614// ProtoReq name.
615func (m EmulationGetOverriddenSensorInformation) ProtoReq() string {
616 return "Emulation.getOverriddenSensorInformation"
617}
618
619// Call the request.
620func (m EmulationGetOverriddenSensorInformation) Call(c Client) (*EmulationGetOverriddenSensorInformationResult, error) {
621 var res EmulationGetOverriddenSensorInformationResult
622 return &res, call(m.ProtoReq(), m, &res, c)
623}
624
625// EmulationGetOverriddenSensorInformationResult (experimental) ...
626type EmulationGetOverriddenSensorInformationResult struct {
627 // RequestedSamplingFrequency ...
628 RequestedSamplingFrequency float64 `json:"requestedSamplingFrequency"`
629}
630
631// EmulationSetSensorOverrideEnabled (experimental) Overrides a platform sensor of a given type. If |enabled| is true, calls to
632// Sensor.start() will use a virtual sensor as backend rather than fetching
633// data from a real hardware sensor. Otherwise, existing virtual
634// sensor-backend Sensor objects will fire an error event and new calls to
635// Sensor.start() will attempt to use a real sensor instead.
636type EmulationSetSensorOverrideEnabled struct {
637 // Enabled ...
638 Enabled bool `json:"enabled"`
639
640 // Type ...
641 Type EmulationSensorType `json:"type"`
642
643 // Metadata (optional) ...
644 Metadata *EmulationSensorMetadata `json:"metadata,omitempty"`
645}
646
647// ProtoReq name.
648func (m EmulationSetSensorOverrideEnabled) ProtoReq() string {
649 return "Emulation.setSensorOverrideEnabled"
650}
651
652// Call sends the request.
653func (m EmulationSetSensorOverrideEnabled) Call(c Client) error {
654 return call(m.ProtoReq(), m, nil, c)
655}
656
657// EmulationSetSensorOverrideReadings (experimental) Updates the sensor readings reported by a sensor type previously overridden
658// by setSensorOverrideEnabled.
659type EmulationSetSensorOverrideReadings struct {
660 // Type ...
661 Type EmulationSensorType `json:"type"`
662
663 // Reading ...
664 Reading *EmulationSensorReading `json:"reading"`
665}
666
667// ProtoReq name.
668func (m EmulationSetSensorOverrideReadings) ProtoReq() string {
669 return "Emulation.setSensorOverrideReadings"
670}
671
672// Call sends the request.
673func (m EmulationSetSensorOverrideReadings) Call(c Client) error {
674 return call(m.ProtoReq(), m, nil, c)
675}
676
677// EmulationSetIdleOverride Overrides the Idle state.
678type EmulationSetIdleOverride struct {
679 // IsUserActive Mock isUserActive
680 IsUserActive bool `json:"isUserActive"`
681
682 // IsScreenUnlocked Mock isScreenUnlocked
683 IsScreenUnlocked bool `json:"isScreenUnlocked"`
684}
685
686// ProtoReq name.
687func (m EmulationSetIdleOverride) ProtoReq() string { return "Emulation.setIdleOverride" }
688
689// Call sends the request.
690func (m EmulationSetIdleOverride) Call(c Client) error {
691 return call(m.ProtoReq(), m, nil, c)
692}
693
694// EmulationClearIdleOverride Clears Idle state overrides.
695type EmulationClearIdleOverride struct{}
696
697// ProtoReq name.
698func (m EmulationClearIdleOverride) ProtoReq() string { return "Emulation.clearIdleOverride" }
699
700// Call sends the request.
701func (m EmulationClearIdleOverride) Call(c Client) error {
702 return call(m.ProtoReq(), m, nil, c)
703}
704
705// EmulationSetNavigatorOverrides (deprecated) (experimental) Overrides value returned by the javascript navigator object.
706type EmulationSetNavigatorOverrides struct {
707 // Platform The platform navigator.platform should return.
708 Platform string `json:"platform"`
709}
710
711// ProtoReq name.
712func (m EmulationSetNavigatorOverrides) ProtoReq() string { return "Emulation.setNavigatorOverrides" }
713
714// Call sends the request.
715func (m EmulationSetNavigatorOverrides) Call(c Client) error {
716 return call(m.ProtoReq(), m, nil, c)
717}
718
719// EmulationSetPageScaleFactor (experimental) Sets a specified page scale factor.
720type EmulationSetPageScaleFactor struct {
721 // PageScaleFactor Page scale factor.
722 PageScaleFactor float64 `json:"pageScaleFactor"`
723}
724
725// ProtoReq name.
726func (m EmulationSetPageScaleFactor) ProtoReq() string { return "Emulation.setPageScaleFactor" }
727
728// Call sends the request.
729func (m EmulationSetPageScaleFactor) Call(c Client) error {
730 return call(m.ProtoReq(), m, nil, c)
731}
732
733// EmulationSetScriptExecutionDisabled Switches script execution in the page.
734type EmulationSetScriptExecutionDisabled struct {
735 // Value Whether script execution should be disabled in the page.
736 Value bool `json:"value"`
737}
738
739// ProtoReq name.
740func (m EmulationSetScriptExecutionDisabled) ProtoReq() string {
741 return "Emulation.setScriptExecutionDisabled"
742}
743
744// Call sends the request.
745func (m EmulationSetScriptExecutionDisabled) Call(c Client) error {
746 return call(m.ProtoReq(), m, nil, c)
747}
748
749// EmulationSetTouchEmulationEnabled Enables touch on platforms which do not support them.
750type EmulationSetTouchEmulationEnabled struct {
751 // Enabled Whether the touch event emulation should be enabled.
752 Enabled bool `json:"enabled"`
753
754 // MaxTouchPoints (optional) Maximum touch points supported. Defaults to one.
755 MaxTouchPoints *int `json:"maxTouchPoints,omitempty"`
756}
757
758// ProtoReq name.
759func (m EmulationSetTouchEmulationEnabled) ProtoReq() string {
760 return "Emulation.setTouchEmulationEnabled"
761}
762
763// Call sends the request.
764func (m EmulationSetTouchEmulationEnabled) Call(c Client) error {
765 return call(m.ProtoReq(), m, nil, c)
766}
767
768// EmulationSetVirtualTimePolicy (experimental) Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
769// the current virtual time policy. Note this supersedes any previous time budget.
770type EmulationSetVirtualTimePolicy struct {
771 // Policy ...
772 Policy EmulationVirtualTimePolicy `json:"policy"`
773
774 // Budget (optional) If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
775 // virtualTimeBudgetExpired event is sent.
776 Budget *float64 `json:"budget,omitempty"`
777
778 // MaxVirtualTimeTaskStarvationCount (optional) If set this specifies the maximum number of tasks that can be run before virtual is forced
779 // forwards to prevent deadlock.
780 MaxVirtualTimeTaskStarvationCount *int `json:"maxVirtualTimeTaskStarvationCount,omitempty"`
781
782 // InitialVirtualTime (optional) If set, base::Time::Now will be overridden to initially return this value.
783 InitialVirtualTime TimeSinceEpoch `json:"initialVirtualTime,omitempty"`
784}
785
786// ProtoReq name.
787func (m EmulationSetVirtualTimePolicy) ProtoReq() string { return "Emulation.setVirtualTimePolicy" }
788
789// Call the request.
790func (m EmulationSetVirtualTimePolicy) Call(c Client) (*EmulationSetVirtualTimePolicyResult, error) {
791 var res EmulationSetVirtualTimePolicyResult
792 return &res, call(m.ProtoReq(), m, &res, c)
793}
794
795// EmulationSetVirtualTimePolicyResult (experimental) ...
796type EmulationSetVirtualTimePolicyResult struct {
797 // VirtualTimeTicksBase Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
798 VirtualTimeTicksBase float64 `json:"virtualTimeTicksBase"`
799}
800
801// EmulationSetLocaleOverride (experimental) Overrides default host system locale with the specified one.
802type EmulationSetLocaleOverride struct {
803 // Locale (optional) ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
804 // restores default host system locale.
805 Locale string `json:"locale,omitempty"`
806}
807
808// ProtoReq name.
809func (m EmulationSetLocaleOverride) ProtoReq() string { return "Emulation.setLocaleOverride" }
810
811// Call sends the request.
812func (m EmulationSetLocaleOverride) Call(c Client) error {
813 return call(m.ProtoReq(), m, nil, c)
814}
815
816// EmulationSetTimezoneOverride Overrides default host system timezone with the specified one.
817type EmulationSetTimezoneOverride struct {
818 // TimezoneID The timezone identifier. List of supported timezones:
819 // https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt
820 // If empty, disables the override and restores default host system timezone.
821 TimezoneID string `json:"timezoneId"`
822}
823
824// ProtoReq name.
825func (m EmulationSetTimezoneOverride) ProtoReq() string { return "Emulation.setTimezoneOverride" }
826
827// Call sends the request.
828func (m EmulationSetTimezoneOverride) Call(c Client) error {
829 return call(m.ProtoReq(), m, nil, c)
830}
831
832// EmulationSetVisibleSize (deprecated) (experimental) Resizes the frame/viewport of the page. Note that this does not affect the frame's container
833// (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
834// on Android.
835type EmulationSetVisibleSize struct {
836 // Width Frame width (DIP).
837 Width int `json:"width"`
838
839 // Height Frame height (DIP).
840 Height int `json:"height"`
841}
842
843// ProtoReq name.
844func (m EmulationSetVisibleSize) ProtoReq() string { return "Emulation.setVisibleSize" }
845
846// Call sends the request.
847func (m EmulationSetVisibleSize) Call(c Client) error {
848 return call(m.ProtoReq(), m, nil, c)
849}
850
851// EmulationSetDisabledImageTypes (experimental) ...
852type EmulationSetDisabledImageTypes struct {
853 // ImageTypes Image types to disable.
854 ImageTypes []EmulationDisabledImageType `json:"imageTypes"`
855}
856
857// ProtoReq name.
858func (m EmulationSetDisabledImageTypes) ProtoReq() string { return "Emulation.setDisabledImageTypes" }
859
860// Call sends the request.
861func (m EmulationSetDisabledImageTypes) Call(c Client) error {
862 return call(m.ProtoReq(), m, nil, c)
863}
864
865// EmulationSetHardwareConcurrencyOverride (experimental) ...
866type EmulationSetHardwareConcurrencyOverride struct {
867 // HardwareConcurrency Hardware concurrency to report
868 HardwareConcurrency int `json:"hardwareConcurrency"`
869}
870
871// ProtoReq name.
872func (m EmulationSetHardwareConcurrencyOverride) ProtoReq() string {
873 return "Emulation.setHardwareConcurrencyOverride"
874}
875
876// Call sends the request.
877func (m EmulationSetHardwareConcurrencyOverride) Call(c Client) error {
878 return call(m.ProtoReq(), m, nil, c)
879}
880
881// EmulationSetUserAgentOverride Allows overriding user agent with the given string.
882// `userAgentMetadata` must be set for Client Hint headers to be sent.
883type EmulationSetUserAgentOverride struct {
884 // UserAgent User agent to use.
885 UserAgent string `json:"userAgent"`
886
887 // AcceptLanguage (optional) Browser language to emulate.
888 AcceptLanguage string `json:"acceptLanguage,omitempty"`
889
890 // Platform (optional) The platform navigator.platform should return.
891 Platform string `json:"platform,omitempty"`
892
893 // UserAgentMetadata (experimental) (optional) To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
894 UserAgentMetadata *EmulationUserAgentMetadata `json:"userAgentMetadata,omitempty"`
895}
896
897// ProtoReq name.
898func (m EmulationSetUserAgentOverride) ProtoReq() string { return "Emulation.setUserAgentOverride" }
899
900// Call sends the request.
901func (m EmulationSetUserAgentOverride) Call(c Client) error {
902 return call(m.ProtoReq(), m, nil, c)
903}
904
905// EmulationSetAutomationOverride (experimental) Allows overriding the automation flag.
906type EmulationSetAutomationOverride struct {
907 // Enabled Whether the override should be enabled.
908 Enabled bool `json:"enabled"`
909}
910
911// ProtoReq name.
912func (m EmulationSetAutomationOverride) ProtoReq() string { return "Emulation.setAutomationOverride" }
913
914// Call sends the request.
915func (m EmulationSetAutomationOverride) Call(c Client) error {
916 return call(m.ProtoReq(), m, nil, c)
917}
918
919// EmulationVirtualTimeBudgetExpired (experimental) Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
920type EmulationVirtualTimeBudgetExpired struct{}
921
922// ProtoEvent name.
923func (evt EmulationVirtualTimeBudgetExpired) ProtoEvent() string {
924 return "Emulation.virtualTimeBudgetExpired"
925}