mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
WebContent: Added IPC calls for getting source
This commit is contained in:
parent
a032c836c4
commit
306501fd4a
Notes:
sideshowbarker
2024-07-18 21:59:40 +09:00
Author: https://github.com/xeons Commit: https://github.com/SerenityOS/serenity/commit/306501fd4af Pull-request: https://github.com/SerenityOS/serenity/pull/5477 Reviewed-by: https://github.com/awesomekling
4 changed files with 10 additions and 0 deletions
|
@ -209,4 +209,11 @@ void ClientConnection::handle(const Messages::WebContentServer::DebugRequest& me
|
|||
}
|
||||
}
|
||||
|
||||
void ClientConnection::handle(const Messages::WebContentServer::GetSource&)
|
||||
{
|
||||
if (auto* doc = page().main_frame().document()) {
|
||||
post_message(Messages::WebContentClient::DidGetSource(doc->url(), doc->source()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ private:
|
|||
virtual void handle(const Messages::WebContentServer::AddBackingStore&) override;
|
||||
virtual void handle(const Messages::WebContentServer::RemoveBackingStore&) override;
|
||||
virtual void handle(const Messages::WebContentServer::DebugRequest&) override;
|
||||
virtual void handle(const Messages::WebContentServer::GetSource&) override;
|
||||
|
||||
void flush_pending_paint_requests();
|
||||
|
||||
|
|
|
@ -17,4 +17,5 @@ endpoint WebContentClient = 90
|
|||
DidRequestAlert(String message) => ()
|
||||
DidRequestConfirm(String message) => (bool result)
|
||||
DidRequestPrompt(String message, String default_) => (String response)
|
||||
DidGetSource(URL url, String source) =|
|
||||
}
|
||||
|
|
|
@ -21,4 +21,5 @@ endpoint WebContentServer = 89
|
|||
KeyDown(i32 key, unsigned modifiers, u32 code_point) =|
|
||||
|
||||
DebugRequest(String request, String argument) =|
|
||||
GetSource() =|
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue