1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // 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_TABS_TAB_GROUP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_GROUP_CONTROLLER_H_
7 
8 #include "base/optional.h"
9 
10 namespace tab_groups {
11 class TabGroupId;
12 }
13 
14 namespace content {
15 class WebContents;
16 }
17 
18 class TabGroupController {
19  public:
20   virtual void CreateTabGroup(const tab_groups::TabGroupId& group) = 0;
21   virtual void OpenTabGroupEditor(const tab_groups::TabGroupId& group) = 0;
22   virtual void ChangeTabGroupContents(const tab_groups::TabGroupId& group) = 0;
23   virtual void ChangeTabGroupVisuals(const tab_groups::TabGroupId& group) = 0;
24   virtual void MoveTabGroup(const tab_groups::TabGroupId& group) = 0;
25   virtual void CloseTabGroup(const tab_groups::TabGroupId& group) = 0;
26 
27   // Methods from TabStipModel that are exposed to TabGroup.
28   virtual base::Optional<tab_groups::TabGroupId> GetTabGroupForTab(
29       int index) const = 0;
30   virtual content::WebContents* GetWebContentsAt(int index) const = 0;
31   virtual int GetTabCount() const = 0;
32 
33  protected:
~TabGroupController()34   virtual ~TabGroupController() {}
35 };
36 
37 #endif  // CHROME_BROWSER_UI_TABS_TAB_GROUP_CONTROLLER_H_
38