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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 270 } |
271 | 271 |
272 - (MediaIndicatorView*)mediaIndicatorView { | 272 - (MediaIndicatorView*)mediaIndicatorView { |
273 return mediaIndicatorView_; | 273 return mediaIndicatorView_; |
274 } | 274 } |
275 | 275 |
276 - (void)setMediaIndicatorView:(MediaIndicatorView*)mediaIndicatorView { | 276 - (void)setMediaIndicatorView:(MediaIndicatorView*)mediaIndicatorView { |
277 [mediaIndicatorView_ removeFromSuperview]; | 277 [mediaIndicatorView_ removeFromSuperview]; |
278 mediaIndicatorView_.reset([mediaIndicatorView retain]); | 278 mediaIndicatorView_.reset([mediaIndicatorView retain]); |
279 [self updateVisibility]; | 279 [self updateVisibility]; |
280 if (mediaIndicatorView_) | 280 if (mediaIndicatorView_) { |
281 [[self view] addSubview:mediaIndicatorView_]; | 281 [[self view] addSubview:mediaIndicatorView_]; |
| 282 [mediaIndicatorView_ |
| 283 setAnimationDoneCallbackObject:self |
| 284 withSelector:@selector(updateVisibility)]; |
| 285 |
| 286 } |
282 } | 287 } |
283 | 288 |
284 - (HoverCloseButton*)closeButton { | 289 - (HoverCloseButton*)closeButton { |
285 return closeButton_; | 290 return closeButton_; |
286 } | 291 } |
287 | 292 |
288 - (NSString*)toolTip { | 293 - (NSString*)toolTip { |
289 return [[self tabView] toolTipText]; | 294 return [[self tabView] toolTipText]; |
290 } | 295 } |
291 | 296 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 // TabStripDragController. | 428 // TabStripDragController. |
424 - (BOOL)tabCanBeDragged:(TabController*)controller { | 429 - (BOOL)tabCanBeDragged:(TabController*)controller { |
425 return [[target_ dragController] tabCanBeDragged:controller]; | 430 return [[target_ dragController] tabCanBeDragged:controller]; |
426 } | 431 } |
427 | 432 |
428 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { | 433 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { |
429 [[target_ dragController] maybeStartDrag:event forTab:tab]; | 434 [[target_ dragController] maybeStartDrag:event forTab:tab]; |
430 } | 435 } |
431 | 436 |
432 @end | 437 @end |
OLD | NEW |