Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| index 93048d49747adb4278c1d804a0c5666ec7075731..32e04a5a46ba913a8794c62503e9768d9f9ea569 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| @@ -31,6 +31,7 @@ |
| #include "chrome/browser/ui/browser_navigator.h" |
| #include "chrome/browser/ui/find_bar/find_manager.h" |
| #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| +#import "chrome/browser/ui/cocoa/chrome_tracking_area.h" |
|
Scott Hess - ex-Googler
2011/02/11 01:17:12
It occurs to me that "chrome" is redundant, and it
Robert Sesek
2011/02/11 02:30:50
Yea, I agree. I was following CrApplication. I'll
|
| #import "chrome/browser/ui/cocoa/constrained_window_mac.h" |
| #import "chrome/browser/ui/cocoa/new_tab_button.h" |
| #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
| @@ -122,7 +123,6 @@ private: |
| } // namespace |
| @interface TabStripController (Private) |
| -- (void)installTrackingArea; |
| - (void)addSubviewToPermanentList:(NSView*)aView; |
| - (void)regenerateSubviewList; |
| - (NSInteger)indexForContentsView:(NSView*)view; |
| @@ -296,6 +296,7 @@ private: |
| bridge_.reset(new TabStripModelObserverBridge(tabStripModel_, self)); |
| tabContentsArray_.reset([[NSMutableArray alloc] init]); |
| tabArray_.reset([[NSMutableArray alloc] init]); |
| + NSWindow* browserWindow = [view window]; |
| // Important note: any non-tab subviews not added to |permanentSubviews_| |
| // (see |-addSubviewToPermanentList:|) will be wiped out. |
| @@ -321,11 +322,12 @@ private: |
| app::mac::GetCachedImageWithName(kNewTabPressedImage)]; |
| newTabButtonShowingHoverImage_ = NO; |
| newTabTrackingArea_.reset( |
| - [[NSTrackingArea alloc] initWithRect:[newTabButton_ bounds] |
| + [[CrTrackingArea alloc] initWithRect:[newTabButton_ bounds] |
| options:(NSTrackingMouseEnteredAndExited | |
| NSTrackingActiveAlways) |
| owner:self |
| userInfo:nil]); |
| + [newTabTrackingArea_ clearOwnerWhenWindowWillClose:browserWindow]; |
| [newTabButton_ addTrackingArea:newTabTrackingArea_.get()]; |
| targetFrames_.reset([[NSMutableDictionary alloc] init]); |
| @@ -350,7 +352,7 @@ private: |
| name:NSViewFrameDidChangeNotification |
| object:tabStripView_]; |
| - trackingArea_.reset([[NSTrackingArea alloc] |
| + trackingArea_.reset([[CrTrackingArea alloc] |
| initWithRect:NSZeroRect // Ignored by NSTrackingInVisibleRect |
| options:NSTrackingMouseEnteredAndExited | |
| NSTrackingMouseMoved | |
| @@ -358,6 +360,7 @@ private: |
| NSTrackingInVisibleRect |
| owner:self |
| userInfo:nil]); |
| + [trackingArea_ clearOwnerWhenWindowWillClose:browserWindow]; |
| [tabStripView_ addTrackingArea:trackingArea_.get()]; |
| // Check to see if the mouse is currently in our bounds so we can |