| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 [[NSNotificationCenter defaultCenter] | 65 [[NSNotificationCenter defaultCenter] |
| 66 addObserver:self | 66 addObserver:self |
| 67 selector:@selector(findPboardUpdated:) | 67 selector:@selector(findPboardUpdated:) |
| 68 name:kFindPasteboardChangedNotification | 68 name:kFindPasteboardChangedNotification |
| 69 object:[FindPasteboard sharedInstance]]; | 69 object:[FindPasteboard sharedInstance]]; |
| 70 } | 70 } |
| 71 return self; | 71 return self; |
| 72 } | 72 } |
| 73 | 73 |
| 74 - (void)dealloc { | 74 - (void)dealloc { |
| 75 // All animations should be explicitly stopped by the TabContents before a tab | 75 // All animations should be explicitly stopped by the TabContentsWrapper |
| 76 // is closed. | 76 // before a tab is closed. |
| 77 DCHECK(!showHideAnimation_.get()); | 77 DCHECK(!showHideAnimation_.get()); |
| 78 DCHECK(!moveAnimation_.get()); | 78 DCHECK(!moveAnimation_.get()); |
| 79 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 79 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 80 [super dealloc]; | 80 [super dealloc]; |
| 81 } | 81 } |
| 82 | 82 |
| 83 - (void)setFindBarBridge:(FindBarBridge*)findBarBridge { | 83 - (void)setFindBarBridge:(FindBarBridge*)findBarBridge { |
| 84 DCHECK(!findBarBridge_); // should only be called once. | 84 DCHECK(!findBarBridge_); // should only be called once. |
| 85 findBarBridge_ = findBarBridge; | 85 findBarBridge_ = findBarBridge; |
| 86 } | 86 } |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 } | 534 } |
| 535 | 535 |
| 536 // Has to happen after |ClearResults()| above. | 536 // Has to happen after |ClearResults()| above. |
| 537 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; | 537 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; |
| 538 [previousButton_ setEnabled:buttonsEnabled]; | 538 [previousButton_ setEnabled:buttonsEnabled]; |
| 539 [nextButton_ setEnabled:buttonsEnabled]; | 539 [nextButton_ setEnabled:buttonsEnabled]; |
| 540 } | 540 } |
| 541 | 541 |
| 542 @end | 542 @end |
| OLD | NEW |