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/tabs/tab_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 selector:@selector(themeChangedNotification:) | 121 selector:@selector(themeChangedNotification:) |
122 name:kBrowserThemeDidChangeNotification | 122 name:kBrowserThemeDidChangeNotification |
123 object:nil]; | 123 object:nil]; |
124 | 124 |
125 [self internalSetSelected:selected_]; | 125 [self internalSetSelected:selected_]; |
126 } | 126 } |
127 return self; | 127 return self; |
128 } | 128 } |
129 | 129 |
130 - (void)dealloc { | 130 - (void)dealloc { |
131 if (mediaIndicatorButton_) { | |
Nico
2014/11/04 00:01:22
(nit: not needed, messages to nil are silently ign
miu
2014/11/04 00:22:29
Done.
| |
132 [mediaIndicatorButton_ setAnimationDoneTarget:nil withAction:nil]; | |
133 [mediaIndicatorButton_ setClickTarget:nil withAction:nil]; | |
134 } | |
131 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 135 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
132 [[self tabView] setController:nil]; | 136 [[self tabView] setController:nil]; |
133 [super dealloc]; | 137 [super dealloc]; |
134 } | 138 } |
135 | 139 |
136 // The internals of |-setSelected:| and |-setActive:| but doesn't set the | 140 // The internals of |-setSelected:| and |-setActive:| but doesn't set the |
137 // backing variables. This updates the drawing state and marks self as needing | 141 // backing variables. This updates the drawing state and marks self as needing |
138 // a re-draw. | 142 // a re-draw. |
139 - (void)internalSetSelected:(BOOL)selected { | 143 - (void)internalSetSelected:(BOOL)selected { |
140 TabView* tabView = [self tabView]; | 144 TabView* tabView = [self tabView]; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
445 // TabStripDragController. | 449 // TabStripDragController. |
446 - (BOOL)tabCanBeDragged:(TabController*)controller { | 450 - (BOOL)tabCanBeDragged:(TabController*)controller { |
447 return [[target_ dragController] tabCanBeDragged:controller]; | 451 return [[target_ dragController] tabCanBeDragged:controller]; |
448 } | 452 } |
449 | 453 |
450 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { | 454 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { |
451 [[target_ dragController] maybeStartDrag:event forTab:tab]; | 455 [[target_ dragController] maybeStartDrag:event forTab:tab]; |
452 } | 456 } |
453 | 457 |
454 @end | 458 @end |
OLD | NEW |