mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Return sessionId in Emulation.setFocusEmulationEnabled
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -2,9 +2,10 @@ const std = @import("std");
|
|||||||
|
|
||||||
const server = @import("../server.zig");
|
const server = @import("../server.zig");
|
||||||
const Ctx = server.Cmd;
|
const Ctx = server.Cmd;
|
||||||
const result = @import("cdp.zig").result;
|
const cdp = @import("cdp.zig");
|
||||||
const getParams = @import("cdp.zig").getParams;
|
const result = cdp.result;
|
||||||
const stringify = @import("cdp.zig").stringify;
|
const getParams = cdp.getParams;
|
||||||
|
const stringify = cdp.stringify;
|
||||||
|
|
||||||
const EmulationMethods = enum {
|
const EmulationMethods = enum {
|
||||||
setEmulatedMedia,
|
setEmulatedMedia,
|
||||||
@@ -38,8 +39,18 @@ fn setEmulatedMedia(
|
|||||||
fn setFocusEmulationEnabled(
|
fn setFocusEmulationEnabled(
|
||||||
alloc: std.mem.Allocator,
|
alloc: std.mem.Allocator,
|
||||||
id: u64,
|
id: u64,
|
||||||
_: *std.json.Scanner,
|
scanner: *std.json.Scanner,
|
||||||
_: *Ctx,
|
_: *Ctx,
|
||||||
) ![]const u8 {
|
) ![]const u8 {
|
||||||
return result(alloc, id, null, null, null);
|
|
||||||
|
// input
|
||||||
|
const Params = struct {
|
||||||
|
enabled: bool,
|
||||||
|
};
|
||||||
|
_ = try getParams(alloc, Params, scanner);
|
||||||
|
const sessionID = try cdp.getSessionID(scanner);
|
||||||
|
|
||||||
|
// output
|
||||||
|
// TODO: dummy
|
||||||
|
return result(alloc, id, null, null, sessionID);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user