diff options
Diffstat (limited to 'Userland/Libraries')
5 files changed, 16 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index 01ce929653..640b4109fc 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -473,6 +473,13 @@ Gfx::IntRect OutOfProcessWebView::notify_server_did_request_minimize_window() return {}; } +Gfx::IntRect OutOfProcessWebView::notify_server_did_request_fullscreen_window() +{ + if (on_fullscreen_window) + return on_fullscreen_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); diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h index 633514d627..8ee72fcad8 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h @@ -106,6 +106,7 @@ public: Function<Gfx::IntSize(Gfx::IntSize const&)> on_resize_window; Function<Gfx::IntRect()> on_maximize_window; Function<Gfx::IntRect()> on_minimize_window; + Function<Gfx::IntRect()> on_fullscreen_window; private: OutOfProcessWebView(); @@ -174,6 +175,7 @@ private: virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize const&) override; virtual Gfx::IntRect notify_server_did_request_maximize_window() override; virtual Gfx::IntRect notify_server_did_request_minimize_window() override; + virtual Gfx::IntRect notify_server_did_request_fullscreen_window() override; virtual void notify_server_did_request_file(Badge<WebContentClient>, String const& path, i32) override; void request_repaint(); diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index b251b49c0d..4d72c53af6 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -61,6 +61,7 @@ public: virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize const&) = 0; virtual Gfx::IntRect notify_server_did_request_maximize_window() = 0; virtual Gfx::IntRect notify_server_did_request_minimize_window() = 0; + virtual Gfx::IntRect notify_server_did_request_fullscreen_window() = 0; virtual void notify_server_did_request_file(Badge<WebContentClient>, String const& path, i32) = 0; }; diff --git a/Userland/Libraries/LibWebView/WebContentClient.cpp b/Userland/Libraries/LibWebView/WebContentClient.cpp index b01091e363..bea1d30057 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.cpp +++ b/Userland/Libraries/LibWebView/WebContentClient.cpp @@ -255,6 +255,11 @@ Messages::WebContentClient::DidRequestMinimizeWindowResponse WebContentClient::d return m_view.notify_server_did_request_minimize_window(); } +Messages::WebContentClient::DidRequestFullscreenWindowResponse WebContentClient::did_request_fullscreen_window() +{ + return m_view.notify_server_did_request_fullscreen_window(); +} + void WebContentClient::did_request_file(String const& path, i32 request_id) { m_view.notify_server_did_request_file({}, path, request_id); diff --git a/Userland/Libraries/LibWebView/WebContentClient.h b/Userland/Libraries/LibWebView/WebContentClient.h index 8ce4bd2833..c8c4752259 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.h +++ b/Userland/Libraries/LibWebView/WebContentClient.h @@ -72,6 +72,7 @@ private: virtual Messages::WebContentClient::DidRequestResizeWindowResponse did_request_resize_window(Gfx::IntSize const&) override; virtual Messages::WebContentClient::DidRequestMaximizeWindowResponse did_request_maximize_window() override; virtual Messages::WebContentClient::DidRequestMinimizeWindowResponse did_request_minimize_window() override; + virtual Messages::WebContentClient::DidRequestFullscreenWindowResponse did_request_fullscreen_window() override; virtual void did_request_file(String const& path, i32) override; ViewImplementation& m_view; |