Mountain/RPC/CocoonService/Window/
DisposeWebviewPanel.rs1use serde_json::json;
8use tauri::Emitter;
9use tonic::{Response, Status};
10use ::Vine::Generated::{DisposeWebviewPanelRequest, Empty};
11
12use crate::{RPC::CocoonService::CocoonServiceImpl, dev_log};
13
14pub async fn Fn(Service:&CocoonServiceImpl, Request:DisposeWebviewPanelRequest) -> Result<Response<Empty>, Status> {
15 dev_log!("cocoon", "[CocoonService] dispose_webview_panel: handle={}", Request.handle);
16
17 let _ = Service
18 .environment
19 .ApplicationHandle
20 .emit("sky://webview/dispose", json!({ "panelId": Request.handle }));
21
22 Ok(Response::new(Empty {}))
23}