chromium/chrome/browser/ui/browser_list.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/browser_list.h"

#include "base/auto_reset.h"
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/observer_list.h"
#include "base/ranges/algorithm.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/buildflags.h"
#include "chrome/browser/lifetime/application_lifetime_desktop.h"
#include "chrome/browser/lifetime/browser_shutdown.h"
#include "chrome/browser/lifetime/termination_notification.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/app_session_service_factory.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/browser_window.h"

UserMetricsAction;
WebContents;

namespace {

BrowserList::BrowserWeakVector GetBrowsersToClose(Profile* profile) {}

BrowserList::BrowserWeakVector GetIncognitoBrowsersToClose(Profile* profile) {}

}  // namespace

// static
base::LazyInstance<base::ObserverList<BrowserListObserver>,
                   BrowserList::ObserverListTraits>
    BrowserList::observers_ =;

// static
BrowserList* BrowserList::instance_ =;

////////////////////////////////////////////////////////////////////////////////
// BrowserList, public:

Browser* BrowserList::GetLastActive() const {}

// static
BrowserList* BrowserList::GetInstance() {}

// static
void BrowserList::AddBrowser(Browser* browser) {}

// static
void BrowserList::RemoveBrowser(Browser* browser) {}

// static
void BrowserList::AddBrowserToActiveList(Browser* browser) {}

// static
void BrowserList::AddObserver(BrowserListObserver* observer) {}

// static
void BrowserList::RemoveObserver(BrowserListObserver* observer) {}

// static
void BrowserList::CloseAllBrowsersWithProfile(Profile* profile) {}

// static
void BrowserList::CloseAllBrowsersWithProfile(
    Profile* profile,
    const CloseCallback& on_close_success,
    const CloseCallback& on_close_aborted,
    bool skip_beforeunload) {}

// static
void BrowserList::CloseAllBrowsersWithIncognitoProfile(
    Profile* profile,
    const CloseCallback& on_close_success,
    const CloseCallback& on_close_aborted,
    bool skip_beforeunload) {}

// static
void BrowserList::TryToCloseBrowserList(
    const BrowserWeakVector& browsers_to_close,
    const CloseCallback& on_close_success,
    const CloseCallback& on_close_aborted,
    const base::FilePath& profile_path,
    const bool skip_beforeunload) {}

// static
void BrowserList::PostTryToCloseBrowserWindow(
    const BrowserWeakVector& browsers_to_close,
    const CloseCallback& on_close_success,
    const CloseCallback& on_close_aborted,
    const base::FilePath& profile_path,
    const bool skip_beforeunload,
    bool tab_close_confirmed) {}

// static
void BrowserList::MoveBrowsersInWorkspaceToFront(
    const std::string& new_workspace) {}

// static
void BrowserList::SetLastActive(Browser* browser) {}

// static
void BrowserList::NotifyBrowserNoLongerActive(Browser* browser) {}

// static
void BrowserList::NotifyBrowserCloseCancelled(Browser* browser,
                                              BrowserClosingStatus reason) {}

// static
void BrowserList::NotifyBrowserCloseStarted(Browser* browser) {}

// static
bool BrowserList::IsOffTheRecordBrowserActive() {}

// static
int BrowserList::GetOffTheRecordBrowsersActiveForProfile(Profile* profile) {}

// static
size_t BrowserList::GetIncognitoBrowserCount() {}

// static
size_t BrowserList::GetGuestBrowserCount() {}

// static
bool BrowserList::IsOffTheRecordBrowserInUse(Profile* profile) {}

////////////////////////////////////////////////////////////////////////////////
// BrowserList, private:

BrowserList::BrowserList() {}

BrowserList::~BrowserList() {}

// static
void BrowserList::RemoveBrowserFrom(Browser* browser,
                                    BrowserVector* browser_list) {}