mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Compare commits
1 Commits
main
...
cdp-browse
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d91d24b12 |
@@ -38,16 +38,22 @@ const DEV_TOOLS_WINDOW_ID = 1923710101;
|
|||||||
pub fn processMessage(cmd: anytype) !void {
|
pub fn processMessage(cmd: anytype) !void {
|
||||||
const action = std.meta.stringToEnum(enum {
|
const action = std.meta.stringToEnum(enum {
|
||||||
getVersion,
|
getVersion,
|
||||||
setDownloadBehavior,
|
setPermission,
|
||||||
getWindowForTarget,
|
|
||||||
setWindowBounds,
|
setWindowBounds,
|
||||||
|
resetPermissions,
|
||||||
|
grantPermissions,
|
||||||
|
getWindowForTarget,
|
||||||
|
setDownloadBehavior,
|
||||||
}, cmd.input.action) orelse return error.UnknownMethod;
|
}, cmd.input.action) orelse return error.UnknownMethod;
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
.getVersion => return getVersion(cmd),
|
.getVersion => return getVersion(cmd),
|
||||||
.setDownloadBehavior => return setDownloadBehavior(cmd),
|
.setPermission => return setPermission(cmd),
|
||||||
.getWindowForTarget => return getWindowForTarget(cmd),
|
|
||||||
.setWindowBounds => return setWindowBounds(cmd),
|
.setWindowBounds => return setWindowBounds(cmd),
|
||||||
|
.resetPermissions => return resetPermissions(cmd),
|
||||||
|
.grantPermissions => return grantPermissions(cmd),
|
||||||
|
.getWindowForTarget => return getWindowForTarget(cmd),
|
||||||
|
.setDownloadBehavior => return setDownloadBehavior(cmd),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +95,21 @@ fn setWindowBounds(cmd: anytype) !void {
|
|||||||
return cmd.sendResult(null, .{});
|
return cmd.sendResult(null, .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: noop method
|
||||||
|
fn grantPermissions(cmd: anytype) !void {
|
||||||
|
return cmd.sendResult(null, .{});
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: noop method
|
||||||
|
fn setPermission(cmd: anytype) !void {
|
||||||
|
return cmd.sendResult(null, .{});
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: noop method
|
||||||
|
fn resetPermissions(cmd: anytype) !void {
|
||||||
|
return cmd.sendResult(null, .{});
|
||||||
|
}
|
||||||
|
|
||||||
const testing = @import("../testing.zig");
|
const testing = @import("../testing.zig");
|
||||||
test "cdp.browser: getVersion" {
|
test "cdp.browser: getVersion" {
|
||||||
var ctx = testing.context();
|
var ctx = testing.context();
|
||||||
|
|||||||
Reference in New Issue
Block a user