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 1f0c0cb3d3837ea482460b741bb2eef400cc5e93..17c28f8094acac4689326f1d81ae9868e742dab9 100644 |
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
@@ -111,6 +111,9 @@ const CGFloat kProjectingIconWidthAndHeight = 32.0; |
// Throbbing duration on webrtc "this web page is watching you" favicon overlay. |
const int kRecordingDurationMs = 1000; |
+// Throbbing duration on audio playing animation. |
+const int kAudioPlayingDurationMs = 2000; |
+ |
// Helper class for doing NSAnimationContext calls that takes a bool to disable |
// all the work. Useful for code that wants to conditionally animate. |
class ScopedNSAnimationContextGroup { |
@@ -1604,6 +1607,20 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) { |
autorelease]; |
iconView = recordingView; |
+ } else if (theme && chrome::IsPlayingAudio(contents)) { |
+ NSImage* audioImage = |
+ theme->GetNSImageNamed(IDR_AUDIO_ANIMATION, true); |
+ NSRect frame = |
+ NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight); |
+ ThrobbingImageView* equalizerFaviconView = |
+ [[[ThrobbingImageView alloc] |
+ initWithFrame:frame |
+ backgroundImage:[imageView image] |
+ throbImage:audioImage |
+ durationMS:kAudioPlayingDurationMs] autorelease]; |
+ [equalizerFaviconView setTweenType:ui::Tween::LINEAR]; |
+ |
+ iconView = equalizerFaviconView; |
} else { |
iconView = imageView; |
} |