Click or drag to resize

EmulationClient Class

Version 130.1.90
This domain emulates different environments for the page.
Inheritance Hierarchy
SystemObject
  CefSharp.DevToolsDevToolsDomainBase
    CefSharp.DevTools.EmulationEmulationClient

Namespace: CefSharp.DevTools.Emulation
Assembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax
public class EmulationClient : DevToolsDomainBase

The EmulationClient type exposes the following members.

Constructors
 NameDescription
Public methodEmulationClient Emulation
Top
Methods
 NameDescription
Public methodClearDeviceMetricsOverrideAsync Clears the overridden device metrics.
Public methodClearDevicePostureOverrideAsync Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.
Public methodClearGeolocationOverrideAsync Clears the overridden Geolocation Position and Error.
Public methodClearIdleOverrideAsync Clears Idle state overrides.
Protected methodEnumToString(ContentEncoding)
(Inherited from DevToolsDomainBase)
Protected methodEnumToString(CSPViolationType)
(Inherited from DevToolsDomainBase)
Protected methodEnumToString(DisabledImageType)
(Inherited from DevToolsDomainBase)
Protected methodEnumToString(Enum)
(Inherited from DevToolsDomainBase)
Protected methodEnumToString(PermissionType)
(Inherited from DevToolsDomainBase)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetOverriddenSensorInformationAsync GetOverriddenSensorInformation
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodResetPageScaleFactorAsync Requests that page scale factor is reset to initial values.
Public methodSetAutoDarkModeOverrideAsync Automatically render all web contents using a dark theme.
Public methodSetAutomationOverrideAsync Allows overriding the automation flag.
Public methodSetCPUThrottlingRateAsync Enables CPU throttling to emulate slow CPUs.
Public methodSetDefaultBackgroundColorOverrideAsync Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
Public methodSetDeviceMetricsOverrideAsync Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
Public methodSetDevicePostureOverrideAsync Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().
Public methodSetDisabledImageTypesAsync SetDisabledImageTypes
Public methodSetDocumentCookieDisabledAsync SetDocumentCookieDisabled
Public methodSetEmitTouchEventsForMouseAsync SetEmitTouchEventsForMouse
Public methodSetEmulatedMediaAsync Emulates the given media type or media feature for CSS media queries.
Public methodSetEmulatedVisionDeficiencyAsync Emulates the given vision deficiency.
Public methodSetFocusEmulationEnabledAsync Enables or disables simulating a focused and active page.
Public methodSetGeolocationOverrideAsync Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
Public methodSetHardwareConcurrencyOverrideAsync SetHardwareConcurrencyOverride
Public methodSetIdleOverrideAsync Overrides the Idle state.
Public methodSetLocaleOverrideAsync Overrides default host system locale with the specified one.
Public methodSetPageScaleFactorAsync Sets a specified page scale factor.
Public methodSetPressureSourceOverrideEnabledAsync Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data.
Public methodSetPressureStateOverrideAsync Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
Public methodSetScriptExecutionDisabledAsync Switches script execution in the page.
Public methodSetScrollbarsHiddenAsync SetScrollbarsHidden
Public methodSetSensorOverrideEnabledAsync Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.
Public methodSetSensorOverrideReadingsAsync Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled.
Public methodSetTimezoneOverrideAsync Overrides default host system timezone with the specified one.
Public methodSetTouchEmulationEnabledAsync Enables touch on platforms which do not support them.
Public methodSetUserAgentOverrideAsync Allows overriding user agent with the given string. `userAgentMetadata` must be set for Client Hint headers to be sent.
Public methodSetVirtualTimePolicyAsync Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.
Protected methodToBase64String
(Inherited from DevToolsDomainBase)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Events
 NameDescription
Public eventVirtualTimeBudgetExpired Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
Top
See Also