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

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

Issue 160116: Implement feature where tabs don't resize when using the close box until the ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // These values are only used during a drag, and override tab positioning. 51 // These values are only used during a drag, and override tab positioning.
52 TabView* placeholderTab_; // weak. Tab being dragged 52 TabView* placeholderTab_; // weak. Tab being dragged
53 NSRect placeholderFrame_; // Frame to use 53 NSRect placeholderFrame_; // Frame to use
54 CGFloat placeholderStretchiness_; // Vertical force shown by streching tab. 54 CGFloat placeholderStretchiness_; // Vertical force shown by streching tab.
55 // Frame targets for all the current views. 55 // Frame targets for all the current views.
56 // target frames are used because repeated requests to [NSView animator]. 56 // target frames are used because repeated requests to [NSView animator].
57 // aren't coalesced, so we store frames to avoid redundant calls. 57 // aren't coalesced, so we store frames to avoid redundant calls.
58 scoped_nsobject<NSMutableDictionary> targetFrames_; 58 scoped_nsobject<NSMutableDictionary> targetFrames_;
59 NSRect newTabTargetFrame_; 59 NSRect newTabTargetFrame_;
60
61 // Width available for resizing the tabs (doesn't include the new tab
62 // button). Used to restrict the available width when closing many tabs at
63 // once to prevent them from resizing to fit the full width. If the entire
64 // width should be used, this will have a value of |kUseFullAvailableWidth|.
65 float availableResizeWidth_;
66 // A tracking area that's the size of the tab strip used to be notified
67 // when the mouse leaves the tab strip. It's installed when the user clicks
68 // the close box of a tab and is removed when they move the mouse outside
69 // of the strip. When they do, we resize the tabs to use all available
70 // space.
71 scoped_nsobject<NSTrackingArea> closeTabTrackingArea_;
60 } 72 }
61 73
62 // Initialize the controller with a view and browser that contains 74 // Initialize the controller with a view and browser that contains
63 // everything else we'll need. |switchView| is the view whose contents get 75 // everything else we'll need. |switchView| is the view whose contents get
64 // "switched" every time the user switches tabs. The children of this view 76 // "switched" every time the user switches tabs. The children of this view
65 // will be released, so if you want them to stay around, make sure 77 // will be released, so if you want them to stay around, make sure
66 // you have retained them. 78 // you have retained them.
67 - (id)initWithView:(TabStripView*)view 79 - (id)initWithView:(TabStripView*)view
68 switchView:(NSView*)switchView 80 switchView:(NSView*)switchView
69 model:(TabStripModel*)model; 81 model:(TabStripModel*)model;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 115
104 // Default height for tabs. 116 // Default height for tabs.
105 + (CGFloat)defaultTabHeight; 117 + (CGFloat)defaultTabHeight;
106 @end 118 @end
107 119
108 // Notification sent when the number of tabs changes. The object will be this 120 // Notification sent when the number of tabs changes. The object will be this
109 // controller. 121 // controller.
110 extern NSString* const kTabStripNumberOfTabsChanged; 122 extern NSString* const kTabStripNumberOfTabsChanged;
111 123
112 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ 124 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | chrome/browser/cocoa/tab_strip_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698