We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7ba567 commit aec7455Copy full SHA for aec7455
src/cdp/emulation.zig
@@ -10,6 +10,7 @@ const stringify = cdp.stringify;
10
const EmulationMethods = enum {
11
setEmulatedMedia,
12
setFocusEmulationEnabled,
13
+ setDeviceMetricsOverride,
14
};
15
16
pub fn emulation(
@@ -24,6 +25,7 @@ pub fn emulation(
24
25
return switch (method) {
26
.setEmulatedMedia => setEmulatedMedia(alloc, id, scanner, ctx),
27
.setFocusEmulationEnabled => setFocusEmulationEnabled(alloc, id, scanner, ctx),
28
+ .setDeviceMetricsOverride => setDeviceMetricsOverride(alloc, id, scanner, ctx),
29
30
}
31
@@ -69,3 +71,17 @@ fn setFocusEmulationEnabled(
69
71
// TODO: dummy
70
72
return result(alloc, id, null, null, sessionID);
73
74
+
75
+fn setDeviceMetricsOverride(
76
+ alloc: std.mem.Allocator,
77
+ id: u64,
78
+ scanner: *std.json.Scanner,
79
+ _: *Ctx,
80
+) ![]const u8 {
81
82
+ // input
83
+ const content = try cdp.getContent(alloc, void, scanner);
84
85
+ // output
86
+ return result(alloc, id, null, null, content.sessionID);
87
+}
0 commit comments