| Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
|
| index 8c57621a9c6a60d7287d9b311cebfa2906e3ad6f..95f2e54a786463ee696ded7d55450521f4d3611a 100644
|
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
|
| @@ -36,7 +36,6 @@
|
| #import "chrome/browser/ui/cocoa/new_tab_button.h"
|
| #import "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h"
|
| #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
|
| -#import "chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h"
|
| #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
|
| #import "chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h"
|
| #import "chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h"
|
| @@ -1620,12 +1619,10 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
|
| if (newState == kTabDone || oldState != newState ||
|
| oldHasIcon != newHasIcon) {
|
| NSView* iconView = nil;
|
| + NSImageView* audioIndicatorView = nil;
|
| if (newHasIcon) {
|
| if (newState == kTabDone) {
|
| NSImageView* imageView = [self iconImageViewForContents:contents];
|
| - TabAudioIndicatorViewMac* tabAudioIndicatorViewMac =
|
| - base::mac::ObjCCast<TabAudioIndicatorViewMac>(
|
| - [tabController iconView]);
|
|
|
| ui::ThemeProvider* theme = [[tabStripView_ window] themeProvider];
|
| if (theme && [tabController projecting]) {
|
| @@ -1666,22 +1663,20 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
|
| animationContainer:animationContainer_.get()] autorelease];
|
|
|
| iconView = recordingView;
|
| - } else if (chrome::IsPlayingAudio(contents) ||
|
| - [tabAudioIndicatorViewMac isAnimating]) {
|
| - if (!tabAudioIndicatorViewMac) {
|
| - NSRect frame =
|
| - NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight);
|
| - tabAudioIndicatorViewMac = [[[TabAudioIndicatorViewMac alloc]
|
| - initWithFrame:frame] autorelease];
|
| - [tabAudioIndicatorViewMac
|
| - setAnimationContainer:animationContainer_.get()];
|
| - }
|
| - [tabAudioIndicatorViewMac
|
| - setIsPlayingAudio:chrome::IsPlayingAudio(contents)];
|
| - [tabAudioIndicatorViewMac setBackgroundImage:[imageView image]];
|
| - iconView = tabAudioIndicatorViewMac;
|
| } else {
|
| iconView = imageView;
|
| +
|
| + if (theme && chrome::IsPlayingAudio(contents)) {
|
| + NSImage* const image =
|
| + theme->GetNSImageNamed(IDR_TAB_AUDIO_INDICATOR);
|
| + if (image) {
|
| + NSRect frame;
|
| + frame.size = [image size];
|
| + audioIndicatorView =
|
| + [[[NSImageView alloc] initWithFrame:frame] autorelease];
|
| + [audioIndicatorView setImage:image];
|
| + }
|
| + }
|
| }
|
| } else if (newState == kTabCrashed) {
|
| NSImage* oldImage = [[self iconImageViewForContents:contents] image];
|
| @@ -1707,6 +1702,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
|
| //DCHECK_LE(NSMaxX([iconView frame]),
|
| // NSWidth([[tabController view] frame]) - kTabOverlap);
|
| }
|
| + [tabController setAudioIndicatorView:audioIndicatorView];
|
| }
|
| }
|
|
|
|
|