refactor: ginify BrowserView (#23578)

This commit is contained in:
Jeremy Rose 2020-07-09 08:48:39 -07:00 committed by GitHub
parent 66d65a6d35
commit 9bd0fc5348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 128 additions and 165 deletions

View file

@ -276,6 +276,10 @@ void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
}
void BrowserWindow::OnWindowClosed() {
// We need to reset the browser views before we call Cleanup, because the
// browser views are child views of the main web contents view, which will be
// deleted by Cleanup.
BaseWindow::ResetBrowserViews();
Cleanup();
// See BaseWindow::OnWindowClosed on why calling InvalidateWeakPtrs.
weak_factory_.InvalidateWeakPtrs();