mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:15:07 +00:00
Browser+LibWebView+WebContent: Add IPC to re[store,size,position] window
Requests to restore, resize, and reposition 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. The spec notes "The specification does not guarantee that the resulting window size will exactly match that which was requested", so these new methods return the actual new size/position.
This commit is contained in:
parent
71aba39562
commit
9505928fdb
7 changed files with 75 additions and 2 deletions
|
@ -200,6 +200,21 @@ void WebContentClient::did_update_resource_count(i32 count_waiting)
|
|||
m_view.notify_server_did_update_resource_count(count_waiting);
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_restore_window()
|
||||
{
|
||||
m_view.notify_server_did_request_restore_window();
|
||||
}
|
||||
|
||||
Messages::WebContentClient::DidRequestRepositionWindowResponse WebContentClient::did_request_reposition_window(Gfx::IntPoint const& position)
|
||||
{
|
||||
return m_view.notify_server_did_request_reposition_window(position);
|
||||
}
|
||||
|
||||
Messages::WebContentClient::DidRequestResizeWindowResponse WebContentClient::did_request_resize_window(Gfx::IntSize const& size)
|
||||
{
|
||||
return m_view.notify_server_did_request_resize_window(size);
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_file(String const& path, i32 request_id)
|
||||
{
|
||||
m_view.notify_server_did_request_file({}, path, request_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue