OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
7 | 7 |
8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 NSPoint hoverPoint_; // Current location of hover in view coords. | 69 NSPoint hoverPoint_; // Current location of hover in view coords. |
70 | 70 |
71 // The location of the current mouseDown event in window coordinates. | 71 // The location of the current mouseDown event in window coordinates. |
72 NSPoint mouseDownPoint_; | 72 NSPoint mouseDownPoint_; |
73 | 73 |
74 NSCellStateValue state_; | 74 NSCellStateValue state_; |
75 | 75 |
76 // The tool tip text for this tab view. | 76 // The tool tip text for this tab view. |
77 base::scoped_nsobject<NSString> toolTipText_; | 77 base::scoped_nsobject<NSString> toolTipText_; |
78 | |
79 // A one-element mask image cache. This cache makes drawing roughly 16% | |
80 // faster. | |
81 base::ScopedCFTypeRef<CGImageRef> maskCache_; | |
82 CGFloat maskCacheWidth_; | |
83 CGFloat maskCacheScale_; | |
84 } | 78 } |
85 | 79 |
86 @property(retain, nonatomic) NSString* title; | 80 @property(retain, nonatomic) NSString* title; |
87 @property(assign, nonatomic) NSRect titleFrame; | 81 @property(assign, nonatomic) NSRect titleFrame; |
88 @property(retain, nonatomic) NSColor* titleColor; | 82 @property(retain, nonatomic) NSColor* titleColor; |
89 @property(assign, nonatomic) BOOL titleHidden; | 83 @property(assign, nonatomic) BOOL titleHidden; |
90 | 84 |
91 // The state affects how the tab will be drawn. | 85 // The state affects how the tab will be drawn. |
92 // NSOnState -> active | 86 // NSOnState -> active |
93 // NSMixedState -> selected | 87 // NSMixedState -> selected |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 120 |
127 // The TabController |controller_| is not the only owner of this view. If the | 121 // The TabController |controller_| is not the only owner of this view. If the |
128 // controller is released before this view, then we could be hanging onto a | 122 // controller is released before this view, then we could be hanging onto a |
129 // garbage pointer. To prevent this, the TabController uses this interface to | 123 // garbage pointer. To prevent this, the TabController uses this interface to |
130 // clear the |controller_| pointer when it is dying. | 124 // clear the |controller_| pointer when it is dying. |
131 @interface TabView (TabControllerInterface) | 125 @interface TabView (TabControllerInterface) |
132 - (void)setController:(TabController*)controller; | 126 - (void)setController:(TabController*)controller; |
133 @end | 127 @end |
134 | 128 |
135 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ | 129 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
OLD | NEW |