mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix close button
This commit is contained in:
@@ -132,7 +132,7 @@ BrowserWindow::~BrowserWindow() {
|
||||
host->GetWidget()->RemoveInputEventObserver(this);
|
||||
api_web_contents_->RemoveObserver(this);
|
||||
// Destroy the WebContents.
|
||||
api_web_contents_->Destroy();
|
||||
OnCloseContents();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,6 +178,10 @@ void BrowserWindow::WebContentsDestroyed() {
|
||||
CloseImmediately();
|
||||
}
|
||||
|
||||
void BrowserWindow::OnCloseContents() {
|
||||
api_web_contents_->Destroy();
|
||||
}
|
||||
|
||||
void BrowserWindow::OnRendererResponsive(content::RenderProcessHost*) {
|
||||
window_unresponsive_closure_.Cancel();
|
||||
Emit("responsive");
|
||||
|
||||
@@ -56,6 +56,7 @@ class BrowserWindow : public BaseWindow,
|
||||
void WebContentsDestroyed() override;
|
||||
|
||||
// ExtendedWebContentsObserver:
|
||||
void OnCloseContents() override;
|
||||
void OnDraggableRegionsUpdated(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) override;
|
||||
void OnSetContentBounds(const gfx::Rect& rect) override;
|
||||
|
||||
Reference in New Issue
Block a user