Browser+LibWebView+WebContent: Add IPC to minimize and maximize window

Requests to maximize and minimize Browser windows will be coming from
the WebContent process rather than the WebDriver process. Add hooks to
propagate these requests back up to the Browser.
This commit is contained in:
Timothy Flynn 2022-11-09 10:04:09 -05:00 committed by Linus Groh
commit 1c398b32ce
Notes: sideshowbarker 2024-07-17 04:38:43 +09:00
7 changed files with 45 additions and 0 deletions

View file

@ -421,6 +421,20 @@ Gfx::IntSize OutOfProcessWebView::notify_server_did_request_resize_window(Gfx::I
return {};
}
Gfx::IntRect OutOfProcessWebView::notify_server_did_request_maximize_window()
{
if (on_maximize_window)
return on_maximize_window();
return {};
}
Gfx::IntRect OutOfProcessWebView::notify_server_did_request_minimize_window()
{
if (on_minimize_window)
return on_minimize_window();
return {};
}
void OutOfProcessWebView::notify_server_did_request_file(Badge<WebContentClient>, String const& path, i32 request_id)
{
auto file = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window(), path);