1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb+WebContent: Add new console-message IPC calls

This patch introduces three new IPC calls for WebContent:

- `Client::did_output_js_console_message(index)`:
  Notifies the client that a new console message was logged.

- `Server::js_console_request_messages(start_index)`:
  Ask the server for console messages starting at the given index.

- `Client::did_get_js_console_messages(start_index, types, messages)`:
  Send the client the messages they requested.

This mechanism will replace the current
`Client::did_js_console_output()` call in the next few commits. This
will allow us to display messages in the console that happened before
the console was opened.
This commit is contained in:
Sam Atkins 2021-09-04 11:14:25 +01:00 committed by Andreas Kling
parent 5220d6d2e5
commit c619a57cf8
9 changed files with 61 additions and 0 deletions

View file

@ -29,6 +29,8 @@ public:
virtual void die() override;
void initialize_js_console(Badge<PageHost>);
private:
Web::Page& page();
const Web::Page& page() const;
@ -52,9 +54,12 @@ private:
virtual void inspect_dom_tree() override;
virtual Messages::WebContentServer::InspectDomNodeResponse inspect_dom_node(i32) override;
virtual Messages::WebContentServer::GetHoveredNodeIdResponse get_hovered_node_id() override;
virtual void js_console_initialize() override;
virtual void js_console_input(String const&) override;
virtual void run_javascript(String const&) override;
virtual void js_console_request_messages(i32) override;
virtual Messages::WebContentServer::GetSelectedTextResponse get_selected_text() override;
virtual void select_all() override;