#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/supports_user_data.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/browser_live_tab_context.h"
#include "components/sessions/core/tab_restore_service.h"
#include "components/sessions/core/tab_restore_service_observer.h"
namespace chrome {
namespace {
const char kBrowserTabRestorerKey[] = …;
class BrowserTabRestorer : public sessions::TabRestoreServiceObserver,
public BrowserListObserver,
public base::SupportsUserData::Data { … };
BrowserTabRestorer::~BrowserTabRestorer() { … }
void BrowserTabRestorer::CreateIfNecessary(Browser* browser) { … }
BrowserTabRestorer::BrowserTabRestorer(Browser* browser)
: … { … }
void BrowserTabRestorer::TabRestoreServiceDestroyed(
sessions::TabRestoreService* service) { … }
void BrowserTabRestorer::TabRestoreServiceLoaded(
sessions::TabRestoreService* service) { … }
void BrowserTabRestorer::OnBrowserRemoved(Browser* browser) { … }
}
void RestoreTab(Browser* browser) { … }
}