// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_SESSIONS_CORE_TAB_RESTORE_TYPES_H_ #define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_TYPES_H_ #include <map> #include <optional> #include <string> #include <vector> #include "base/time/time.h" #include "base/uuid.h" #include "components/sessions/core/serialized_navigation_entry.h" #include "components/sessions/core/serialized_user_agent_override.h" #include "components/sessions/core/session_id.h" #include "components/sessions/core/session_types.h" #include "components/sessions/core/sessions_export.h" #include "components/tab_groups/tab_group_id.h" #include "components/tab_groups/tab_group_visual_data.h" #include "ui/gfx/geometry/rect.h" namespace sessions::tab_restore { // Interface used to allow the test to provide a custom time. class SESSIONS_EXPORT TimeFactory { … }; // A class that is used to associate platform-specific data with // TabRestoreTab. See LiveTab::GetPlatformSpecificTabData(). class SESSIONS_EXPORT PlatformSpecificTabData { … }; // The type of entry. enum Type { … }; // Represent a previously open object (a memento) that is stored in memory // allowing us to identify and restore specific entries using their `id` to a // previous state. struct SESSIONS_EXPORT Entry { … }; // Represents a previously open tab. // If you add a new field that can allocate memory also add // it to the EstimatedMemoryUsage() implementation. struct SESSIONS_EXPORT Tab : public Entry { … }; // Represents a previously open group. // If you add a new field that can allocate memory also add // it to the EstimatedMemoryUsage() implementation. struct SESSIONS_EXPORT Group : public Entry { … }; // Represents a previously open window. // If you add a new field that can allocate memory, please also add // it to the EstimatedMemoryUsage() implementation. struct SESSIONS_EXPORT Window : public Entry { … }; } // namespace sessions::tab_restore #endif // COMPONENTS_SESSIONS_CORE_TAB_RESTORE_TYPES_H_