diff options
| -rw-r--r-- | chrome/browser/cocoa/chrome_browser_window.mm | 4 | ||||
| -rw-r--r-- | chrome/browser/cocoa/download_item_cell.mm | 8 | ||||
| -rw-r--r-- | chrome/browser/cocoa/fullscreen_controller.mm | 1 | ||||
| -rw-r--r-- | chrome/browser/cocoa/gradient_button_cell.mm | 9 |
4 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/chrome_browser_window.mm b/chrome/browser/cocoa/chrome_browser_window.mm index eecf09f..35aae1a 100644 --- a/chrome/browser/cocoa/chrome_browser_window.mm +++ b/chrome/browser/cocoa/chrome_browser_window.mm @@ -58,6 +58,10 @@ namespace { - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSDistributedNotificationCenter defaultCenter] removeObserver:self]; + if (widgetTrackingArea_) { + [[self frameView] removeTrackingArea:widgetTrackingArea_]; + widgetTrackingArea_.reset(); + } [super dealloc]; } diff --git a/chrome/browser/cocoa/download_item_cell.mm b/chrome/browser/cocoa/download_item_cell.mm index 84d4421..6e14a27 100644 --- a/chrome/browser/cocoa/download_item_cell.mm +++ b/chrome/browser/cocoa/download_item_cell.mm @@ -219,6 +219,14 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const { [completionAnimation_ stopAnimation]; if ([hideStatusAnimation_ isAnimating]) [hideStatusAnimation_ stopAnimation]; + if (trackingAreaButton_) { + [[self controlView] removeTrackingArea:trackingAreaButton_]; + trackingAreaButton_.reset(); + } + if (trackingAreaDropdown_) { + [[self controlView] removeTrackingArea:trackingAreaDropdown_]; + trackingAreaDropdown_.reset(); + } [secondaryTitle_ release]; [secondaryFont_ release]; [super dealloc]; diff --git a/chrome/browser/cocoa/fullscreen_controller.mm b/chrome/browser/cocoa/fullscreen_controller.mm index 74de909..1b463d0 100644 --- a/chrome/browser/cocoa/fullscreen_controller.mm +++ b/chrome/browser/cocoa/fullscreen_controller.mm @@ -169,6 +169,7 @@ const CGFloat kFloatingBarVerticalOffset = 22; - (void)dealloc { DCHECK(!isFullscreen_); + DCHECK(!trackingArea_); [super dealloc]; } diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm index 15110e8..523b4d7 100644 --- a/chrome/browser/cocoa/gradient_button_cell.mm +++ b/chrome/browser/cocoa/gradient_button_cell.mm @@ -88,6 +88,14 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; return self; } +- (void)dealloc { + if (trackingArea_) { + [[self controlView] removeTrackingArea:trackingArea_]; + trackingArea_.reset(); + } + [super dealloc]; +} + - (NSGradient*)gradientForHoverAlpha:(CGFloat)hoverAlpha isThemed:(BOOL)themed { CGFloat startAlpha = 0.6 + 0.3 * hoverAlpha; @@ -146,6 +154,7 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; if (showOnly) { if (trackingArea_.get()) { [self setShowsBorderOnlyWhileMouseInside:NO]; + [[self controlView] removeTrackingArea:trackingArea_]; } trackingArea_.reset([[NSTrackingArea alloc] initWithRect:[[self controlView] |
