| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/scoped_nsobject.h" | 11 #include "base/scoped_nsobject.h" |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" | 13 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" |
| 14 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" | 14 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" |
| 15 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 15 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
| 16 #import "third_party/GTM/AppKit/GTMWindowSheetController.h" | 16 #import "third_party/GTM/AppKit/GTMWindowSheetController.h" |
| 17 | 17 |
| 18 @class CrTrackingArea; |
| 18 @class NewTabButton; | 19 @class NewTabButton; |
| 19 @class TabContentsController; | 20 @class TabContentsController; |
| 20 @class TabView; | 21 @class TabView; |
| 21 @class TabStripView; | 22 @class TabStripView; |
| 22 | 23 |
| 23 class Browser; | 24 class Browser; |
| 24 class ConstrainedWindowMac; | 25 class ConstrainedWindowMac; |
| 25 class TabStripModelObserverBridge; | 26 class TabStripModelObserverBridge; |
| 26 class TabStripModel; | 27 class TabStripModel; |
| 27 class TabContents; | 28 class TabContents; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // YES if tabs are to be laid out vertically instead of horizontally. | 65 // YES if tabs are to be laid out vertically instead of horizontally. |
| 65 BOOL verticalLayout_; | 66 BOOL verticalLayout_; |
| 66 | 67 |
| 67 @private | 68 @private |
| 68 scoped_nsobject<TabStripView> tabStripView_; | 69 scoped_nsobject<TabStripView> tabStripView_; |
| 69 NSView* switchView_; // weak | 70 NSView* switchView_; // weak |
| 70 scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags | 71 scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags |
| 71 NewTabButton* newTabButton_; // weak, obtained from the nib. | 72 NewTabButton* newTabButton_; // weak, obtained from the nib. |
| 72 | 73 |
| 73 // Tracks the newTabButton_ for rollovers. | 74 // Tracks the newTabButton_ for rollovers. |
| 74 scoped_nsobject<NSTrackingArea> newTabTrackingArea_; | 75 scoped_nsobject<CrTrackingArea> newTabTrackingArea_; |
| 75 scoped_ptr<TabStripModelObserverBridge> bridge_; | 76 scoped_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 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // into being. | 117 // into being. |
| 117 BOOL initialLayoutComplete_; | 118 BOOL initialLayoutComplete_; |
| 118 | 119 |
| 119 // Width available for resizing the tabs (doesn't include the new tab | 120 // Width available for resizing the tabs (doesn't include the new tab |
| 120 // button). Used to restrict the available width when closing many tabs at | 121 // button). Used to restrict the available width when closing many tabs at |
| 121 // once to prevent them from resizing to fit the full width. If the entire | 122 // once to prevent them from resizing to fit the full width. If the entire |
| 122 // width should be used, this will have a value of |kUseFullAvailableWidth|. | 123 // width should be used, this will have a value of |kUseFullAvailableWidth|. |
| 123 float availableResizeWidth_; | 124 float availableResizeWidth_; |
| 124 // A tracking area that's the size of the tab strip used to be notified | 125 // A tracking area that's the size of the tab strip used to be notified |
| 125 // when the mouse moves in the tab strip | 126 // when the mouse moves in the tab strip |
| 126 scoped_nsobject<NSTrackingArea> trackingArea_; | 127 scoped_nsobject<CrTrackingArea> trackingArea_; |
| 127 TabView* hoveredTab_; // weak. Tab that the mouse is hovering over | 128 TabView* hoveredTab_; // weak. Tab that the mouse is hovering over |
| 128 | 129 |
| 129 // Array of subviews which are permanent (and which should never be removed), | 130 // Array of subviews which are permanent (and which should never be removed), |
| 130 // such as the new-tab button, but *not* the tabs themselves. | 131 // such as the new-tab button, but *not* the tabs themselves. |
| 131 scoped_nsobject<NSMutableArray> permanentSubviews_; | 132 scoped_nsobject<NSMutableArray> permanentSubviews_; |
| 132 | 133 |
| 133 // The default favicon, so we can use one copy for all buttons. | 134 // The default favicon, so we can use one copy for all buttons. |
| 134 scoped_nsobject<NSImage> defaultFavIcon_; | 135 scoped_nsobject<NSImage> defaultFavIcon_; |
| 135 | 136 |
| 136 // The amount by which to indent the tabs on the left (to make room for the | 137 // The amount by which to indent the tabs on the left (to make room for the |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; | 254 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; |
| 254 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; | 255 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
| 255 | 256 |
| 256 @end | 257 @end |
| 257 | 258 |
| 258 // Notification sent when the number of tabs changes. The object will be this | 259 // Notification sent when the number of tabs changes. The object will be this |
| 259 // controller. | 260 // controller. |
| 260 extern NSString* const kTabStripNumberOfTabsChanged; | 261 extern NSString* const kTabStripNumberOfTabsChanged; |
| 261 | 262 |
| 262 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 263 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |