blob: c9b66f2baf0bc485cbb4debae237f1904294343e [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2022 The Chromium Authors
avynn588605d12022-06-15 21:28:152// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_ASH_DESKS_CHROME_DESKS_UTIL_H_
6#define CHROME_BROWSER_UI_ASH_DESKS_CHROME_DESKS_UTIL_H_
7
8#include <memory>
9
10class TabGroupModel;
11
12namespace app_restore {
13struct TabGroupInfo;
14} // namespace app_restore
15
16namespace chrome_desks_util {
17
avynnd5c3adc72023-09-13 23:09:5518// Name for app not available toast.
Lei Zhangda99b402025-05-06 21:11:4819inline constexpr char kAppNotAvailableTemplateToastName[] =
avynnd5c3adc72023-09-13 23:09:5520 "AppNotAvailableTemplateToast";
21
avynn588605d12022-06-15 21:28:1522// Given a TabGroupModel that contains at least a single TabGroup this method
Andrew Pantera7b4e99b92023-04-21 18:54:5623// returns a vector that contains tab_groups::TabGroupInfo representations of
24// the TabGroups contained within the model.
25std::vector<tab_groups::TabGroupInfo> ConvertTabGroupsToTabGroupInfos(
26 const TabGroupModel* group_model);
avynn588605d12022-06-15 21:28:1527
28// Given a vector of TabGroupInfo this function attaches tab groups to the
29// out_browser instance passed as the second parameter.
30void AttachTabGroupsToBrowserInstance(
avynn1db65c82022-12-07 20:30:5931 const std::vector<tab_groups::TabGroupInfo>& tab_groups,
avynn588605d12022-06-15 21:28:1532 Browser* browser);
33
avynne6bc27b2022-07-12 01:30:1334// Sets tabs in `browser` to be pinned up to the `first_non_pinned_tab_index`.
35void SetBrowserPinnedTabs(int32_t first_non_pinned_tab_index, Browser* browser);
36
avynn588605d12022-06-15 21:28:1537} // namespace chrome_desks_util
38
shaochenguang77a7a02b2023-11-22 19:33:5639#endif // CHROME_BROWSER_UI_ASH_DESKS_CHROME_DESKS_UTIL_H_