Chromium Code Reviews| Index: chrome/browser/cocoa/download_started_animation_mac.mm |
| diff --git a/chrome/browser/cocoa/download_started_animation_mac.mm b/chrome/browser/cocoa/download_started_animation_mac.mm |
| index dfd7db70206fee945597bb045c9e22be67aa44ed..b89bb464d162b86fa9c2f627f4b335387e3078c2 100644 |
| --- a/chrome/browser/cocoa/download_started_animation_mac.mm |
| +++ b/chrome/browser/cocoa/download_started_animation_mac.mm |
| @@ -35,8 +35,9 @@ class DownloadAnimationTabObserver; |
| }; |
| + (void)startAnimationWithTabContents:(TabContents*)tabContents; |
| -// Called by our DownloadAnimationTabObserver if the tab is hidden or closed. |
| -- (void)animationComplete; |
| + |
| +// Called by the Observer if the tab is hidden or closed. |
| +- (void)closeAnimation; |
| @end |
| @@ -62,7 +63,7 @@ class DownloadAnimationTabObserver : public NotificationObserver { |
| const NotificationSource& source, |
| const NotificationDetails& details) { |
| // This ends up deleting us. |
| - [owner_ animationComplete]; |
| + [owner_ closeAnimation]; |
| } |
| private: |
| @@ -162,18 +163,19 @@ class DownloadAnimationTabObserver : public NotificationObserver { |
| [animation_ setFrame:frame display:YES]; |
| } |
| -- (void)windowWillClose:(NSNotification*)notification { |
| - DCHECK([[notification object] isEqual:animation_]); |
| - [self animationComplete]; |
| +- (void)closeAnimation { |
|
Scott Hess - ex-Googler
2010/08/31 14:29:48
+1 for the name change, -animationComplete never q
|
| + [animation_ close]; |
| } |
| -- (void)animationComplete { |
| +// When the animation closes, close the parent window. |
|
Scott Hess - ex-Googler
2010/08/31 14:29:48
Either this comment is too subtle for me to unders
|
| +- (void)windowWillClose:(NSNotification*)notification { |
| + DCHECK([[notification object] isEqual:animation_]); |
| [[animation_ parentWindow] removeChildWindow:animation_]; |
| [self release]; |
| } |
| + (void)startAnimationWithTabContents:(TabContents*)contents { |
| - // Will be deleted when the animation is complete in -animationComplete. |
| + // Will be deleted when the animation window closes. |
| DownloadStartedAnimationMac* controller = |
| [[self alloc] initWithTabContents:contents]; |
| // The initializer can return nil. |