Skip to main content

browser_protocol/deviceorientation/
mod.rs

1use serde::{Serialize, Deserialize};
2use serde_json::Value as JsonValue;
3
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct ClearDeviceOrientationOverrideParams {}
6
7impl ClearDeviceOrientationOverrideParams { pub const METHOD: &'static str = "DeviceOrientation.clearDeviceOrientationOverride"; }
8
9impl crate::CdpCommand for ClearDeviceOrientationOverrideParams {
10    const METHOD: &'static str = "DeviceOrientation.clearDeviceOrientationOverride";
11    type Response = crate::EmptyReturns;
12}
13
14/// Overrides the Device Orientation.
15
16#[derive(Debug, Clone, Serialize, Deserialize, Default)]
17#[serde(rename_all = "camelCase")]
18pub struct SetDeviceOrientationOverrideParams {
19    /// Mock alpha
20
21    pub alpha: f64,
22    /// Mock beta
23
24    pub beta: f64,
25    /// Mock gamma
26
27    pub gamma: f64,
28}
29
30impl SetDeviceOrientationOverrideParams { pub const METHOD: &'static str = "DeviceOrientation.setDeviceOrientationOverride"; }
31
32impl crate::CdpCommand for SetDeviceOrientationOverrideParams {
33    const METHOD: &'static str = "DeviceOrientation.setDeviceOrientationOverride";
34    type Response = crate::EmptyReturns;
35}