OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 class BaseTab; | 9 class BaseTab; |
10 class TabStripSelectionModel; | 10 class TabStripSelectionModel; |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Point; | 13 class Point; |
14 } | 14 } |
15 namespace views { | 15 namespace views { |
16 class MouseEvent; | 16 class MouseEvent; |
17 } | 17 } |
18 | 18 |
19 // Controller for tabs. | 19 // Controller for tabs. |
20 class TabController { | 20 class TabController { |
21 public: | 21 public: |
22 virtual const TabStripSelectionModel& GetSelectionModel() = 0; | 22 virtual const TabStripSelectionModel& GetSelectionModel() = 0; |
23 | 23 |
| 24 // Returns true if multiple selection is supported. |
| 25 virtual bool SupportsMultipleSelection() = 0; |
| 26 |
24 // Selects the tab. | 27 // Selects the tab. |
25 virtual void SelectTab(BaseTab* tab) = 0; | 28 virtual void SelectTab(BaseTab* tab) = 0; |
26 | 29 |
27 // Extends the selection from the anchor to |tab|. | 30 // Extends the selection from the anchor to |tab|. |
28 virtual void ExtendSelectionTo(BaseTab* tab) = 0; | 31 virtual void ExtendSelectionTo(BaseTab* tab) = 0; |
29 | 32 |
30 // Toggles whether |tab| is selected. | 33 // Toggles whether |tab| is selected. |
31 virtual void ToggleSelected(BaseTab* tab) = 0; | 34 virtual void ToggleSelected(BaseTab* tab) = 0; |
32 | 35 |
33 // Adds the selection from the anchor to |tab|. | 36 // Adds the selection from the anchor to |tab|. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 76 |
74 // Informs that an active tab is selected when already active (ie - clicked | 77 // Informs that an active tab is selected when already active (ie - clicked |
75 // when already active/foreground). | 78 // when already active/foreground). |
76 virtual void ClickActiveTab(const BaseTab* tab) const = 0; | 79 virtual void ClickActiveTab(const BaseTab* tab) const = 0; |
77 | 80 |
78 protected: | 81 protected: |
79 virtual ~TabController() {} | 82 virtual ~TabController() {} |
80 }; | 83 }; |
81 | 84 |
82 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ | 85 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ |
OLD | NEW |