OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_CONTROLLER_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" | 8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" |
9 #include "ui/base/ui_base_types.h" | 9 #include "ui/base/ui_base_types.h" |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 class Tab; | 12 class Tab; |
13 class TabStrip; | 13 class TabStrip; |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Point; | 16 class Point; |
17 } | 17 } |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 class ListSelectionModel; | 20 class ListSelectionModel; |
21 } | 21 } |
22 | 22 |
23 class Profile; | |
24 | |
23 // Model/Controller for the TabStrip. | 25 // Model/Controller for the TabStrip. |
24 // NOTE: All indices used by this class are in model coordinates. | 26 // NOTE: All indices used by this class are in model coordinates. |
25 class TabStripController { | 27 class TabStripController { |
26 public: | 28 public: |
27 virtual ~TabStripController() {} | 29 virtual ~TabStripController() {} |
28 | 30 |
29 // Returns the selection model of the tabstrip. | 31 // Returns the selection model of the tabstrip. |
30 virtual const ui::ListSelectionModel& GetSelectionModel() = 0; | 32 virtual const ui::ListSelectionModel& GetSelectionModel() = 0; |
31 | 33 |
32 // Returns the number of tabs in the model. | 34 // Returns the number of tabs in the model. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 // Invoked if the layout type might have changed. | 101 // Invoked if the layout type might have changed. |
100 virtual void LayoutTypeMaybeChanged() = 0; | 102 virtual void LayoutTypeMaybeChanged() = 0; |
101 | 103 |
102 // Notifies controller that the user started dragging this tabstrip's tabs. | 104 // Notifies controller that the user started dragging this tabstrip's tabs. |
103 virtual void OnStartedDraggingTabs() = 0; | 105 virtual void OnStartedDraggingTabs() = 0; |
104 | 106 |
105 // Notifies controller that the user stopped dragging this tabstrip's tabs. | 107 // Notifies controller that the user stopped dragging this tabstrip's tabs. |
106 // This is also called when the tabs that the user is dragging were detached | 108 // This is also called when the tabs that the user is dragging were detached |
107 // from this tabstrip but the user is still dragging the tabs. | 109 // from this tabstrip but the user is still dragging the tabs. |
108 virtual void OnStoppedDraggingTabs() = 0; | 110 virtual void OnStoppedDraggingTabs() = 0; |
111 | |
112 // Returns the profile associated with the controller's model. | |
113 virtual Profile* GetProfile() = 0; | |
sky
2013/11/15 00:48:54
I think you can get the profile from the browserco
michaelpg
2013/11/15 21:08:01
Could you please clarify this for me? The TabStrip
sky
2013/11/15 22:07:18
You are right. In which case I would prefer to kee
michaelpg
2013/11/18 23:24:51
Done.
| |
109 }; | 114 }; |
110 | 115 |
111 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_CONTROLLER_H_ | 116 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |