diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 33420297a50..9e28602c92d 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -158,17 +158,6 @@ void BrowserWindow::RenderViewHostChanged(content::RenderViewHost* old_host, new_host->GetWidget()->AddInputEventObserver(this); } -void BrowserWindow::DidFirstVisuallyNonEmptyPaint() { - if (window()->IsClosed() || window()->IsVisible()) - return; - - // When there is a non-empty first paint, resize the RenderWidget to force - // Chromium to draw. - auto* const view = web_contents()->GetRenderWidgetHostView(); - view->Show(); - view->SetSize(window()->GetContentSize()); -} - void BrowserWindow::BeforeUnloadDialogCancelled() { WindowList::WindowCloseCancelled(window()); // Cancel unresponsive event when window close is cancelled. diff --git a/shell/browser/api/electron_api_browser_window.h b/shell/browser/api/electron_api_browser_window.h index 6c75bed938b..94a21f813df 100644 --- a/shell/browser/api/electron_api_browser_window.h +++ b/shell/browser/api/electron_api_browser_window.h @@ -49,7 +49,6 @@ class BrowserWindow : public BaseWindow, // content::WebContentsObserver: void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) override; - void DidFirstVisuallyNonEmptyPaint() override; void BeforeUnloadDialogCancelled() override; void OnRendererUnresponsive(content::RenderProcessHost*) override; void OnRendererResponsive(