Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 13867007: Tab audio indicator: Use animation container on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 441d975dd0fe407eb12e943d626ace804fc8a1ab..acc8cb32f6c1e513e5dd5bee1f2ad761398b9bdb 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -65,6 +65,7 @@
#include "grit/ui_resources.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
+#import "ui/base/animation/animation_container.h"
#import "ui/base/cocoa/tracking_area.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/list_selection_model.h"
@@ -500,6 +501,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
[[TabStripDragController alloc] initWithTabStripController:self]);
tabContentsArray_.reset([[NSMutableArray alloc] init]);
tabArray_.reset([[NSMutableArray alloc] init]);
+ animationContainer_ = new ui::AnimationContainer;
NSWindow* browserWindow = [view window];
// Important note: any non-tab subviews not added to |permanentSubviews_|
@@ -1623,12 +1625,13 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
kProjectingIconWidthAndHeight,
kProjectingIconWidthAndHeight);
TabProjectingImageView* projectingView =
- [[[TabProjectingImageView alloc] initWithFrame:frame
- backgroundImage:[imageView image]
- projectorImage:projector
- throbImage:projectorGlow
- durationMS:kRecordingDurationMs]
- autorelease];
+ [[[TabProjectingImageView alloc]
+ initWithFrame:frame
+ backgroundImage:[imageView image]
+ projectorImage:projector
+ throbImage:projectorGlow
+ durationMS:kRecordingDurationMs
+ animationContainer:animationContainer_] autorelease];
iconView = projectingView;
} else if (theme && chrome::ShouldShowRecordingIndicator(contents)) {
@@ -1646,7 +1649,8 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
backgroundImage:favIconMasked
throbImage:recording
durationMS:kRecordingDurationMs
- throbPosition:kThrobPositionBottomRight] autorelease];
+ throbPosition:kThrobPositionBottomRight
+ animationContainer:animationContainer_] autorelease];
iconView = recordingView;
} else if (chrome::IsPlayingAudio(contents) ||
@@ -1656,6 +1660,8 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight);
tabAudioIndicatorViewMac = [[[TabAudioIndicatorViewMac alloc]
initWithFrame:frame] autorelease];
+ [tabAudioIndicatorViewMac
+ setAnimationContainer:animationContainer_];
}
[tabAudioIndicatorViewMac
setIsPlayingAudio:chrome::IsPlayingAudio(contents)];
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.h ('k') | chrome/browser/ui/cocoa/tabs/throbbing_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698