| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 name:kFindPasteboardChangedNotification | 43 name:kFindPasteboardChangedNotification |
| 44 object:[FindPasteboard sharedInstance]]; | 44 object:[FindPasteboard sharedInstance]]; |
| 45 } | 45 } |
| 46 return self; | 46 return self; |
| 47 } | 47 } |
| 48 | 48 |
| 49 - (void)dealloc { | 49 - (void)dealloc { |
| 50 // All animations should be explicitly stopped by the TabContents before a tab | 50 // All animations should be explicitly stopped by the TabContents before a tab |
| 51 // is closed. | 51 // is closed. |
| 52 DCHECK(!currentAnimation_.get()); | 52 DCHECK(!currentAnimation_.get()); |
| 53 // Remove our view from its superview so it doesn't attempt to reference |
| 54 // it when the controller is gone. |
| 55 [[self view] removeFromSuperview]; |
| 53 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 56 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 54 [super dealloc]; | 57 [super dealloc]; |
| 55 } | 58 } |
| 56 | 59 |
| 57 - (void)setFindBarBridge:(FindBarBridge*)findBarBridge { | 60 - (void)setFindBarBridge:(FindBarBridge*)findBarBridge { |
| 58 DCHECK(!findBarBridge_); // should only be called once. | 61 DCHECK(!findBarBridge_); // should only be called once. |
| 59 findBarBridge_ = findBarBridge; | 62 findBarBridge_ = findBarBridge; |
| 60 } | 63 } |
| 61 | 64 |
| 62 - (void)awakeFromNib { | 65 - (void)awakeFromNib { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 342 |
| 340 currentAnimation_.reset( | 343 currentAnimation_.reset( |
| 341 [[NSViewAnimation alloc] | 344 [[NSViewAnimation alloc] |
| 342 initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]); | 345 initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]); |
| 343 [currentAnimation_ setDuration:duration]; | 346 [currentAnimation_ setDuration:duration]; |
| 344 [currentAnimation_ setDelegate:self]; | 347 [currentAnimation_ setDelegate:self]; |
| 345 [currentAnimation_ startAnimation]; | 348 [currentAnimation_ startAnimation]; |
| 346 } | 349 } |
| 347 | 350 |
| 348 @end | 351 @end |
| OLD | NEW |