#include "chrome/browser/extensions/api/tab_groups/tab_groups_util.h"
#include "base/hash/hash.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/token.h"
#include "chrome/browser/extensions/api/tab_groups/tab_groups_constants.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
#include "chrome/browser/ui/tabs/tab_group.h"
#include "chrome/browser/ui/tabs/tab_group_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/ui_features.h"
#include "components/tab_groups/tab_group_color.h"
#include "components/tab_groups/tab_group_id.h"
#include "components/tab_groups/tab_group_visual_data.h"
#include "content/public/browser/browser_context.h"
#include "extensions/common/error_utils.h"
namespace extensions {
namespace tab_groups_util {
int GetGroupId(const tab_groups::TabGroupId& id) { … }
int GetWindowIdOfGroup(const tab_groups::TabGroupId& id) { … }
api::tab_groups::TabGroup CreateTabGroupObject(
const tab_groups::TabGroupId& id,
const tab_groups::TabGroupVisualData& visual_data) { … }
std::optional<api::tab_groups::TabGroup> CreateTabGroupObject(
const tab_groups::TabGroupId& id) { … }
bool GetGroupById(int group_id,
content::BrowserContext* browser_context,
bool include_incognito,
Browser** browser,
tab_groups::TabGroupId* id,
const tab_groups::TabGroupVisualData** visual_data,
std::string* error) { … }
bool GetGroupById(int group_id,
content::BrowserContext* browser_context,
bool include_incognito,
tab_groups::TabGroupId* id,
std::string* error) { … }
api::tab_groups::Color ColorIdToColor(
const tab_groups::TabGroupColorId& color_id) { … }
tab_groups::TabGroupColorId ColorToColorId(api::tab_groups::Color color) { … }
bool IsGroupSaved(tab_groups::TabGroupId tab_group_id,
TabStripModel* tab_strip_model) { … }
}
}