#include "chrome/browser/sessions/chrome_tab_restore_service_client.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_common_utils.h"
#include "chrome/common/url_constants.h"
#include "components/sessions/content/content_live_tab.h"
#include "components/tab_groups/tab_group_id.h"
#include "extensions/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
#include "chrome/browser/sessions/exit_type_service.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/apps/app_service/web_contents_app_id_utils.h"
#include "chrome/browser/apps/platform_apps/platform_app_launch.h"
#endif
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/ui/browser_live_tab_context.h"
#else
#include "chrome/browser/ui/android/tab_model/android_live_tab_context.h"
#endif
ChromeTabRestoreServiceClient::ChromeTabRestoreServiceClient(Profile* profile)
: … { … }
ChromeTabRestoreServiceClient::~ChromeTabRestoreServiceClient() { … }
sessions::LiveTabContext* ChromeTabRestoreServiceClient::CreateLiveTabContext(
sessions::LiveTabContext* existing_context,
sessions::SessionWindow::WindowType type,
const std::string& app_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state,
const std::string& workspace,
const std::string& user_title,
const std::map<std::string, std::string>& extra_data) { … }
sessions::LiveTabContext*
ChromeTabRestoreServiceClient::FindLiveTabContextForTab(
const sessions::LiveTab* tab) { … }
sessions::LiveTabContext*
ChromeTabRestoreServiceClient::FindLiveTabContextWithID(SessionID desired_id) { … }
sessions::LiveTabContext*
ChromeTabRestoreServiceClient::FindLiveTabContextWithGroup(
tab_groups::TabGroupId group) { … }
bool ChromeTabRestoreServiceClient::ShouldTrackURLForRestore(const GURL& url) { … }
std::string ChromeTabRestoreServiceClient::GetExtensionAppIDForTab(
sessions::LiveTab* tab) { … }
base::FilePath ChromeTabRestoreServiceClient::GetPathToSaveTo() { … }
GURL ChromeTabRestoreServiceClient::GetNewTabURL() { … }
bool ChromeTabRestoreServiceClient::HasLastSession() { … }
void ChromeTabRestoreServiceClient::GetLastSession(
sessions::GetLastSessionCallback callback) { … }
void ChromeTabRestoreServiceClient::OnTabRestored(const GURL& url) { … }