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 "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 305 } |
306 if (node->parent() == bookmarkModel_->bookmark_bar_node()) { | 306 if (node->parent() == bookmarkModel_->bookmark_bar_node()) { |
307 [offTheSideButton_ setIsContinuousPulsing:doPulse]; | 307 [offTheSideButton_ setIsContinuousPulsing:doPulse]; |
308 return; | 308 return; |
309 } | 309 } |
310 | 310 |
311 NOTREACHED() << "no bookmark button found to pulse!"; | 311 NOTREACHED() << "no bookmark button found to pulse!"; |
312 } | 312 } |
313 | 313 |
314 - (void)dealloc { | 314 - (void)dealloc { |
| 315 // Clear delegate so it doesn't get called during stopAnimation. |
| 316 [[self animatableView] setResizeDelegate:nil]; |
| 317 |
315 // We better stop any in-flight animation if we're being killed. | 318 // We better stop any in-flight animation if we're being killed. |
316 [[self animatableView] stopAnimation]; | 319 [[self animatableView] stopAnimation]; |
317 | 320 |
318 // Remove our view from its superview so it doesn't attempt to reference | 321 // Remove our view from its superview so it doesn't attempt to reference |
319 // it when the controller is gone. | 322 // it when the controller is gone. |
320 //TODO(dmaclach): Remove -- http://crbug.com/25845 | 323 //TODO(dmaclach): Remove -- http://crbug.com/25845 |
321 [[self view] removeFromSuperview]; | 324 [[self view] removeFromSuperview]; |
322 | 325 |
323 // Be sure there is no dangling pointer. | 326 // Be sure there is no dangling pointer. |
324 if ([[self view] respondsToSelector:@selector(setController:)]) | 327 if ([[self view] respondsToSelector:@selector(setController:)]) |
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2784 // to minimize touching the object passed in (likely a mock). | 2787 // to minimize touching the object passed in (likely a mock). |
2785 - (void)setButtonContextMenu:(id)menu { | 2788 - (void)setButtonContextMenu:(id)menu { |
2786 buttonContextMenu_ = menu; | 2789 buttonContextMenu_ = menu; |
2787 } | 2790 } |
2788 | 2791 |
2789 - (void)setIgnoreAnimations:(BOOL)ignore { | 2792 - (void)setIgnoreAnimations:(BOOL)ignore { |
2790 ignoreAnimations_ = ignore; | 2793 ignoreAnimations_ = ignore; |
2791 } | 2794 } |
2792 | 2795 |
2793 @end | 2796 @end |
OLD | NEW |