MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / HandleTabSecurityUpdate

Method HandleTabSecurityUpdate

BrowserWindow.cpp:678–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678HRESULT BrowserWindow::HandleTabSecurityUpdate(size_t tabId, ICoreWebView2* webview, ICoreWebView2DevToolsProtocolEventReceivedEventArgs* args)
679{
680 wil::unique_cotaskmem_string jsonArgs;
681 RETURN_IF_FAILED(args->get_ParameterObjectAsJson(&jsonArgs));
682 web::json::value securityEvent = web::json::value::parse(jsonArgs.get());
683
684 web::json::value jsonObj = web::json::value::parse(L"{}");
685 jsonObj[L"message"] = web::json::value(MG_SECURITY_UPDATE);
686 jsonObj[L"args"] = web::json::value::parse(L"{}");
687 jsonObj[L"args"][L"tabId"] = web::json::value::number(tabId);
688 jsonObj[L"args"][L"state"] = securityEvent.at(L"securityState");
689
690 return PostJsonToWebView(jsonObj, m_controlsWebView.Get());
691}
692
693void BrowserWindow::HandleTabCreated(size_t tabId, bool shouldBeActive)
694{

Callers 1

InitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected