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

Unified Diff: chrome/browser/cocoa/popup_blocked_animation_mac.mm

Issue 3169030: Change the conditions on which the popup blocked animation is shown to be more reliable. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix compile Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/popup_blocked_animation_mac.mm
diff --git a/chrome/browser/cocoa/popup_blocked_animation_mac.mm b/chrome/browser/cocoa/popup_blocked_animation_mac.mm
index 44a765b003a16d4fc78f9021edcbff675f3da594..8db52feaa4a39a8c3494f621d26ee79bdf302bdb 100644
--- a/chrome/browser/cocoa/popup_blocked_animation_mac.mm
+++ b/chrome/browser/cocoa/popup_blocked_animation_mac.mm
@@ -25,8 +25,8 @@ class PopupBlockedAnimationObserver;
AnimatableImage* animation_;
};
-// Called by our the Observer if the tab is hidden or closed.
-- (void)animationComplete;
+// Called by the Observer if the tab is hidden or closed.
+- (void)closeAnimation;
@end
@@ -52,7 +52,7 @@ class PopupBlockedAnimationObserver : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details) {
// This ends up deleting us.
- [owner_ animationComplete];
+ [owner_ closeAnimation];
}
private:
@@ -162,12 +162,13 @@ class PopupBlockedAnimationObserver : public NotificationObserver {
[super dealloc];
}
-- (void)windowWillClose:(NSNotification*)notification {
- DCHECK([[notification object] isEqual:animation_]);
- [self animationComplete];
+- (void)closeAnimation {
+ [animation_ close];
}
-- (void)animationComplete {
+// When the animation window closes, release self.
+- (void)windowWillClose:(NSNotification*)notification {
+ DCHECK([[notification object] isEqual:animation_]);
[[animation_ parentWindow] removeChildWindow:animation_];
[self release];
}

Powered by Google App Engine
This is Rietveld 408576698