| 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 #ifndef CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/base/animation/throb_animation.h" | 12 #include "ui/base/animation/throb_animation.h" |
| 13 | 13 |
| 14 class ThrobbingImageViewAnimationDelegate; | 14 class ThrobbingImageViewAnimationDelegate; |
| 15 | 15 |
| 16 // Where to position the throb image. For the overlay position, the throb image | 16 // Where to position the throb image. For the overlay position, the throb image |
| 17 // will be drawn with the same size as the background image. For the bottom | 17 // will be drawn with the same size as the background image. For the bottom |
| 18 // right position, it will have its original size. | 18 // right position, it will have its original size. |
| 19 enum ThrobPosition { | 19 enum ThrobPosition { |
| 20 kThrobPositionOverlay, | 20 kThrobPositionOverlay, |
| 21 kThrobPositionBottomRight | 21 kThrobPositionBottomRight |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 @interface ThrobbingImageView : NSView { | 24 @interface ThrobbingImageView : NSView { |
| 25 @protected | 25 @protected |
| 26 scoped_nsobject<NSImage> backgroundImage_; | 26 base::scoped_nsobject<NSImage> backgroundImage_; |
| 27 scoped_nsobject<NSImage> throbImage_; | 27 base::scoped_nsobject<NSImage> throbImage_; |
| 28 scoped_ptr<ui::ThrobAnimation> throbAnimation_; | 28 scoped_ptr<ui::ThrobAnimation> throbAnimation_; |
| 29 | 29 |
| 30 @private | 30 @private |
| 31 scoped_ptr<ThrobbingImageViewAnimationDelegate> delegate_; | 31 scoped_ptr<ThrobbingImageViewAnimationDelegate> delegate_; |
| 32 ThrobPosition throbPosition_; | 32 ThrobPosition throbPosition_; |
| 33 } | 33 } |
| 34 | 34 |
| 35 - (id)initWithFrame:(NSRect)rect | 35 - (id)initWithFrame:(NSRect)rect |
| 36 backgroundImage:(NSImage*)backgroundImage | 36 backgroundImage:(NSImage*)backgroundImage |
| 37 throbImage:(NSImage*)throbImage | 37 throbImage:(NSImage*)throbImage |
| 38 durationMS:(int)durationMS | 38 durationMS:(int)durationMS |
| 39 throbPosition:(ThrobPosition)throbPosition | 39 throbPosition:(ThrobPosition)throbPosition |
| 40 animationContainer:(ui::AnimationContainer*)animationContainer; | 40 animationContainer:(ui::AnimationContainer*)animationContainer; |
| 41 | 41 |
| 42 @end | 42 @end |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ | 44 #endif // CHROME_BROWSER_UI_COCOA_TABS_THROBBING_IMAGE_VIEW_H_ |
| OLD | NEW |