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 [mediaIndicatorButton_ setAnimationDoneTarget:nil withAction:nil]; |
| 132 [mediaIndicatorButton_ setClickTarget:nil withAction:nil]; |
131 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 133 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
132 [[self tabView] setController:nil]; | 134 [[self tabView] setController:nil]; |
133 [super dealloc]; | 135 [super dealloc]; |
134 } | 136 } |
135 | 137 |
136 // The internals of |-setSelected:| and |-setActive:| but doesn't set the | 138 // The internals of |-setSelected:| and |-setActive:| but doesn't set the |
137 // backing variables. This updates the drawing state and marks self as needing | 139 // backing variables. This updates the drawing state and marks self as needing |
138 // a re-draw. | 140 // a re-draw. |
139 - (void)internalSetSelected:(BOOL)selected { | 141 - (void)internalSetSelected:(BOOL)selected { |
140 TabView* tabView = [self tabView]; | 142 TabView* tabView = [self tabView]; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 // TabStripDragController. | 447 // TabStripDragController. |
446 - (BOOL)tabCanBeDragged:(TabController*)controller { | 448 - (BOOL)tabCanBeDragged:(TabController*)controller { |
447 return [[target_ dragController] tabCanBeDragged:controller]; | 449 return [[target_ dragController] tabCanBeDragged:controller]; |
448 } | 450 } |
449 | 451 |
450 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { | 452 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { |
451 [[target_ dragController] maybeStartDrag:event forTab:tab]; | 453 [[target_ dragController] maybeStartDrag:event forTab:tab]; |
452 } | 454 } |
453 | 455 |
454 @end | 456 @end |
OLD | NEW |