Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: chrome/browser/cocoa/tab_strip_controller.h

Issue 181002: Reverting 24700. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/tab_controller.mm ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_COCOA_TAB_STRIP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ 6 #define CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 NSRect newTabTargetFrame_; 65 NSRect newTabTargetFrame_;
66 // If YES, do not show the new tab button during layout. 66 // If YES, do not show the new tab button during layout.
67 BOOL forceNewTabButtonHidden_; 67 BOOL forceNewTabButtonHidden_;
68 68
69 // Width available for resizing the tabs (doesn't include the new tab 69 // Width available for resizing the tabs (doesn't include the new tab
70 // button). Used to restrict the available width when closing many tabs at 70 // button). Used to restrict the available width when closing many tabs at
71 // once to prevent them from resizing to fit the full width. If the entire 71 // once to prevent them from resizing to fit the full width. If the entire
72 // width should be used, this will have a value of |kUseFullAvailableWidth|. 72 // width should be used, this will have a value of |kUseFullAvailableWidth|.
73 float availableResizeWidth_; 73 float availableResizeWidth_;
74 // A tracking area that's the size of the tab strip used to be notified 74 // A tracking area that's the size of the tab strip used to be notified
75 // when the mouse moves in the tab strip 75 // when the mouse leaves the tab strip. It's installed when the user clicks
76 scoped_nsobject<NSTrackingArea> trackingArea_; 76 // the close box of a tab and is removed when they move the mouse outside
77 TabView* hoveredTab_; // weak. Tab that the mouse is hovering over 77 // of the strip. When they do, we resize the tabs to use all available
78 // space.
79 scoped_nsobject<NSTrackingArea> closeTabTrackingArea_;
78 80
79 // Array of subviews which are permanent (and which should never be removed), 81 // Array of subviews which are permanent (and which should never be removed),
80 // such as the new-tab button, but *not* the tabs themselves. 82 // such as the new-tab button, but *not* the tabs themselves.
81 scoped_nsobject<NSMutableArray> permanentSubviews_; 83 scoped_nsobject<NSMutableArray> permanentSubviews_;
82 84
83 // Manages per-tab sheets. 85 // Manages per-tab sheets.
84 scoped_nsobject<GTMWindowSheetController> sheetController_; 86 scoped_nsobject<GTMWindowSheetController> sheetController_;
85 } 87 }
86 88
87 // Initialize the controller with a view and browser that contains 89 // Initialize the controller with a view and browser that contains
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 frame:(NSRect)frame 122 frame:(NSRect)frame
121 yStretchiness:(CGFloat)yStretchiness; 123 yStretchiness:(CGFloat)yStretchiness;
122 124
123 // Show or hide the new tab button. The button is hidden immediately, but 125 // Show or hide the new tab button. The button is hidden immediately, but
124 // waits until the next call to |-layoutTabs| to show it again. 126 // waits until the next call to |-layoutTabs| to show it again.
125 - (void)showNewTabButton:(BOOL)show; 127 - (void)showNewTabButton:(BOOL)show;
126 128
127 // Force the tabs to rearrange themselves to reflect the current model. 129 // Force the tabs to rearrange themselves to reflect the current model.
128 - (void)layoutTabs; 130 - (void)layoutTabs;
129 131
130 // The user changed the theme, or theme state changed. 132 // The user changed the theme.
131 - (void)applyTheme; 133 - (void)userChangedTheme;
132 134
133 // Default height for tabs. 135 // Default height for tabs.
134 + (CGFloat)defaultTabHeight; 136 + (CGFloat)defaultTabHeight;
135 137
136 // Returns the (lazily created) window sheet controller of this window. Used 138 // Returns the (lazily created) window sheet controller of this window. Used
137 // for the per-tab sheets. 139 // for the per-tab sheets.
138 - (GTMWindowSheetController*)sheetController; 140 - (GTMWindowSheetController*)sheetController;
139 141
140 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; 142 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window;
141 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; 143 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window;
142 144
143 @end 145 @end
144 146
145 // Notification sent when the number of tabs changes. The object will be this 147 // Notification sent when the number of tabs changes. The object will be this
146 // controller. 148 // controller.
147 extern NSString* const kTabStripNumberOfTabsChanged; 149 extern NSString* const kTabStripNumberOfTabsChanged;
148 150
149 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ 151 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_controller.mm ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698