mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: emit will-navigate for sandboxed contents (#22188)
This commit is contained in:
@@ -291,4 +291,12 @@ void ElectronSandboxedRendererClient::WillReleaseScriptContext(
|
||||
InvokeHiddenCallback(context, kLifecycleKey, "onExit");
|
||||
}
|
||||
|
||||
bool ElectronSandboxedRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
bool is_initial_navigation,
|
||||
bool is_server_redirect) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -37,6 +37,11 @@ class ElectronSandboxedRendererClient : public RendererClientBase {
|
||||
void RenderViewCreated(content::RenderView*) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
bool ShouldFork(blink::WebLocalFrame* frame,
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
bool is_initial_navigation,
|
||||
bool is_server_redirect) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<base::ProcessMetrics> metrics_;
|
||||
|
||||
Reference in New Issue
Block a user