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_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" | 13 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" |
13 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" | 14 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" |
14 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 15 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
15 #include "chrome/browser/ui/tabs/hover_tab_selector.h" | 16 #include "chrome/browser/ui/tabs/hover_tab_selector.h" |
16 #include "chrome/browser/ui/tabs/tab_utils.h" | 17 #include "chrome/browser/ui/tabs/tab_utils.h" |
17 | 18 |
18 @class CrTrackingArea; | 19 @class CrTrackingArea; |
19 @class CustomWindowControlsView; | 20 @class CustomWindowControlsView; |
20 @class NewTabButton; | 21 @class NewTabButton; |
21 @class TabContentsController; | 22 @class TabContentsController; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 NSView* switchView_; // weak | 66 NSView* switchView_; // weak |
66 base::scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server | 67 base::scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server |
67 // drags | 68 // drags |
68 NewTabButton* newTabButton_; // weak, obtained from the nib. | 69 NewTabButton* newTabButton_; // weak, obtained from the nib. |
69 | 70 |
70 // The controller that manages all the interactions of dragging tabs. | 71 // The controller that manages all the interactions of dragging tabs. |
71 base::scoped_nsobject<TabStripDragController> dragController_; | 72 base::scoped_nsobject<TabStripDragController> dragController_; |
72 | 73 |
73 // Tracks the newTabButton_ for rollovers. | 74 // Tracks the newTabButton_ for rollovers. |
74 base::scoped_nsobject<CrTrackingArea> newTabTrackingArea_; | 75 base::scoped_nsobject<CrTrackingArea> newTabTrackingArea_; |
75 scoped_ptr<TabStripModelObserverBridge> bridge_; | 76 std::unique_ptr<TabStripModelObserverBridge> bridge_; |
76 Browser* browser_; // weak | 77 Browser* browser_; // weak |
77 TabStripModel* tabStripModel_; // weak | 78 TabStripModel* tabStripModel_; // weak |
78 // Delegate that is informed about tab state changes. | 79 // Delegate that is informed about tab state changes. |
79 id<TabStripControllerDelegate> delegate_; // weak | 80 id<TabStripControllerDelegate> delegate_; // weak |
80 | 81 |
81 // YES if the new tab button is currently displaying the hover image (if the | 82 // YES if the new tab button is currently displaying the hover image (if the |
82 // mouse is currently over the button). | 83 // mouse is currently over the button). |
83 BOOL newTabButtonShowingHoverImage_; | 84 BOOL newTabButtonShowingHoverImage_; |
84 | 85 |
85 // Access to the TabContentsControllers (which own the parent view | 86 // Access to the TabContentsControllers (which own the parent view |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 139 |
139 // The amount by which to indent the tabs on the sides (to make room for the | 140 // The amount by which to indent the tabs on the sides (to make room for the |
140 // red/yellow/green and incognito/fullscreen buttons). | 141 // red/yellow/green and incognito/fullscreen buttons). |
141 CGFloat leftIndentForControls_; | 142 CGFloat leftIndentForControls_; |
142 CGFloat rightIndentForControls_; | 143 CGFloat rightIndentForControls_; |
143 | 144 |
144 // Is the mouse currently inside the strip; | 145 // Is the mouse currently inside the strip; |
145 BOOL mouseInside_; | 146 BOOL mouseInside_; |
146 | 147 |
147 // Helper for performing tab selection as a result of dragging over a tab. | 148 // Helper for performing tab selection as a result of dragging over a tab. |
148 scoped_ptr<HoverTabSelector> hoverTabSelector_; | 149 std::unique_ptr<HoverTabSelector> hoverTabSelector_; |
149 | 150 |
150 // A container view for custom traffic light buttons, which must be manually | 151 // A container view for custom traffic light buttons, which must be manually |
151 // added in fullscreen in 10.10+. | 152 // added in fullscreen in 10.10+. |
152 base::scoped_nsobject<CustomWindowControlsView> customWindowControls_; | 153 base::scoped_nsobject<CustomWindowControlsView> customWindowControls_; |
153 base::scoped_nsobject<CrTrackingArea> customWindowControlsTrackingArea_; | 154 base::scoped_nsobject<CrTrackingArea> customWindowControlsTrackingArea_; |
154 } | 155 } |
155 | 156 |
156 @property(nonatomic) CGFloat leftIndentForControls; | 157 @property(nonatomic) CGFloat leftIndentForControls; |
157 @property(nonatomic) CGFloat rightIndentForControls; | 158 @property(nonatomic) CGFloat rightIndentForControls; |
158 | 159 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 - (TabAlertState)alertStateForContents:(content::WebContents*)contents; | 288 - (TabAlertState)alertStateForContents:(content::WebContents*)contents; |
288 | 289 |
289 @end | 290 @end |
290 | 291 |
291 @interface TabStripController(TestingAPI) | 292 @interface TabStripController(TestingAPI) |
292 - (void)setTabTitle:(TabController*)tab | 293 - (void)setTabTitle:(TabController*)tab |
293 withContents:(content::WebContents*)contents; | 294 withContents:(content::WebContents*)contents; |
294 @end | 295 @end |
295 | 296 |
296 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 297 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |