Chromium Code Reviews| 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..7915f3f625df8f128c81e1abf54bf6a465e77158 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,19 @@ 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* recordingView = [[[ThrobbingImageView alloc] |
|
Nico
2013/03/01 09:55:22
nit: s/recordingView/equalizerFaviconView/ (or sim
sail
2013/03/01 17:06:47
Done.
|
| + initWithFrame:frame |
| + backgroundImage:[imageView image] |
| + throbImage:audioImage |
| + durationMS:kAudioPlayingDurationMs] autorelease]; |
| + [recordingView setTweenType:ui::Tween::LINEAR]; |
| + |
| + iconView = recordingView; |
| } else { |
| iconView = imageView; |
| } |