OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_projecting_image_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h" |
6 | 6 |
7 @implementation TabProjectingImageView | 7 @implementation TabProjectingImageView |
8 | 8 |
9 - (id)initWithFrame:(NSRect)rect | 9 - (id)initWithFrame:(NSRect)rect |
10 backgroundImage:(NSImage*)backgroundImage | 10 backgroundImage:(NSImage*)backgroundImage |
11 projectorImage:(NSImage*)projectorImage | 11 projectorImage:(NSImage*)projectorImage |
12 throbImage:(NSImage*)throbImage | 12 throbImage:(NSImage*)throbImage |
13 durationMS:(int)durationMS | 13 durationMS:(int)durationMS |
14 animationContainer:(ui::AnimationContainer*)animationContainer { | 14 animationContainer:(gfx::AnimationContainer*)animationContainer { |
15 if ((self = [super initWithFrame:rect | 15 if ((self = [super initWithFrame:rect |
16 backgroundImage:backgroundImage | 16 backgroundImage:backgroundImage |
17 throbImage:throbImage | 17 throbImage:throbImage |
18 durationMS:durationMS | 18 durationMS:durationMS |
19 throbPosition:kThrobPositionOverlay | 19 throbPosition:kThrobPositionOverlay |
20 animationContainer:animationContainer])) { | 20 animationContainer:animationContainer])) { |
21 projectorImage_.reset([projectorImage retain]); | 21 projectorImage_.reset([projectorImage retain]); |
22 } | 22 } |
23 return self; | 23 return self; |
24 } | 24 } |
(...skipping 28 matching lines...) Expand all Loading... |
53 operation:NSCompositeSourceOver | 53 operation:NSCompositeSourceOver |
54 fraction:1]; | 54 fraction:1]; |
55 | 55 |
56 [throbImage_ drawInRect:[self bounds] | 56 [throbImage_ drawInRect:[self bounds] |
57 fromRect:NSZeroRect | 57 fromRect:NSZeroRect |
58 operation:NSCompositeSourceOver | 58 operation:NSCompositeSourceOver |
59 fraction:throbAnimation_->GetCurrentValue()]; | 59 fraction:throbAnimation_->GetCurrentValue()]; |
60 } | 60 } |
61 | 61 |
62 @end | 62 @end |
OLD | NEW |