From 6c052c45db9e88c15f9c352fd09c812fe8924df1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 16 Mar 2023 18:24:30 +0300 Subject: [PATCH] LibWebView: Add window handle in `ClientState` in `ViewImplementation` Add field for a handle that is going to be used by WebDriver to identify top-level browsing contexts. It is supposed to be populated by WebContent client during creation. Co-authored-by: Timothy Flynn --- Userland/Libraries/LibWebView/ViewImplementation.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index d065f14c7c..958932d52d 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -30,6 +30,8 @@ public: AK::URL const& url() const { return m_url; } + String const& handle() const { return m_client_state.client_handle; } + void load(AK::URL const&); void load_html(StringView, AK::URL const&); void load_empty_document(); @@ -129,6 +131,7 @@ protected: struct ClientState { RefPtr client; + String client_handle; SharedBitmap front_bitmap; SharedBitmap back_bitmap; i32 next_bitmap_id { 0 };