LibWebView: Reduce IPC boilerplate within the chrome process

Add a small helper function to find the view / log when the view cannot
be found.
This commit is contained in:
Timothy Flynn 2024-03-29 09:44:49 -04:00 committed by Andreas Kling
commit 7a1847e6e3
Notes: sideshowbarker 2024-07-16 18:06:41 +09:00
2 changed files with 237 additions and 581 deletions

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/HashMap.h>
#include <AK/SourceLocation.h>
#include <LibIPC/ConnectionToServer.h>
#include <LibWeb/HTML/ActivateTab.h>
#include <LibWeb/HTML/FileFilter.h>
@ -109,6 +110,8 @@ private:
virtual void inspector_did_execute_console_script(u64 page_id, String const& script) override;
virtual Messages::WebContentClient::RequestWorkerAgentResponse request_worker_agent(u64 page_id) override;
Optional<ViewImplementation&> view_for_page_id(u64, SourceLocation = SourceLocation::current());
// FIXME: Does a HashMap holding references make sense?
HashMap<u64, ViewImplementation*> m_views;
};