mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:22:45 +00:00 
			
		
		
		
	WebContent: Added IPC calls for getting source
This commit is contained in:
		
							parent
							
								
									a032c836c4
								
							
						
					
					
						commit
						306501fd4a
					
				
					 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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brandon Scott
						Brandon Scott