#include "chrome/browser/lifetime/browser_close_manager.h"
#include <iterator>
#include <vector>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "build/build_config.h"
#include "chrome/browser/background/background_mode_manager.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_core_service.h"
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/lifetime/browser_shutdown.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/buildflags.h"
#include "content/public/browser/web_contents.h"
#if BUILDFLAG(ENABLE_CHROME_NOTIFICATIONS)
#include "chrome/browser/notifications/notification_ui_manager.h"
#endif
namespace {
void ShowInProgressDownloads(Profile* profile) { … }
}
BrowserCloseManager::BrowserCloseManager() : … { … }
BrowserCloseManager::~BrowserCloseManager() { … }
void BrowserCloseManager::StartClosingBrowsers() { … }
void BrowserCloseManager::CancelBrowserClose() { … }
void BrowserCloseManager::TryToCloseBrowsers() { … }
void BrowserCloseManager::OnBrowserReportCloseable(bool proceed) { … }
void BrowserCloseManager::CheckForDownloadsInProgress() { … }
void BrowserCloseManager::ConfirmCloseWithPendingDownloads(
int download_count,
base::OnceCallback<void(bool)> callback) { … }
void BrowserCloseManager::OnReportDownloadsCancellable(bool proceed) { … }
void BrowserCloseManager::CloseBrowsers() { … }