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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.mm

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_audio_indicator_view_mac.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h"
6 6
7 #include "chrome/browser/ui/tabs/tab_audio_indicator.h" 7 #include "chrome/browser/ui/tabs/tab_audio_indicator.h"
8 #include "ui/gfx/canvas_skia_paint.h" 8 #include "ui/gfx/canvas_skia_paint.h"
9 #include "ui/gfx/image/image.h" 9 #include "ui/gfx/image/image.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 - (void)setIsPlayingAudio:(BOOL)isPlayingAudio { 43 - (void)setIsPlayingAudio:(BOOL)isPlayingAudio {
44 tabAudioIndicator_->SetIsPlayingAudio(isPlayingAudio); 44 tabAudioIndicator_->SetIsPlayingAudio(isPlayingAudio);
45 } 45 }
46 46
47 - (void)setBackgroundImage:(NSImage*)backgroundImage { 47 - (void)setBackgroundImage:(NSImage*)backgroundImage {
48 gfx::Image image([backgroundImage retain]); 48 gfx::Image image([backgroundImage retain]);
49 tabAudioIndicator_->set_favicon(*image.ToImageSkia()); 49 tabAudioIndicator_->set_favicon(*image.ToImageSkia());
50 } 50 }
51 51
52 - (void)setAnimationContainer:(ui::AnimationContainer*)animationContainer { 52 - (void)setAnimationContainer:(gfx::AnimationContainer*)animationContainer {
53 tabAudioIndicator_->SetAnimationContainer(animationContainer); 53 tabAudioIndicator_->SetAnimationContainer(animationContainer);
54 } 54 }
55 55
56 - (BOOL)isAnimating { 56 - (BOOL)isAnimating {
57 return tabAudioIndicator_->IsAnimating(); 57 return tabAudioIndicator_->IsAnimating();
58 } 58 }
59 59
60 - (void)drawRect:(NSRect)rect { 60 - (void)drawRect:(NSRect)rect {
61 gfx::CanvasSkiaPaint canvas(rect, false); 61 gfx::CanvasSkiaPaint canvas(rect, false);
62 canvas.set_composite_alpha(true); 62 canvas.set_composite_alpha(true);
63 tabAudioIndicator_->Paint(&canvas, gfx::Rect(NSRectToCGRect([self bounds]))); 63 tabAudioIndicator_->Paint(&canvas, gfx::Rect(NSRectToCGRect([self bounds])));
64 } 64 }
65 65
66 @end 66 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698