Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / tabs / media_indicator_view.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/tabs/tab_utils.h"
12
13 class MediaIndicatorViewAnimationDelegate;
14
15 namespace gfx {
16 class Animation;
17 }  // namespace gfx
18
19 @interface MediaIndicatorView : NSImageView {
20  @private
21   TabMediaState mediaState_;
22   scoped_ptr<MediaIndicatorViewAnimationDelegate> delegate_;
23   scoped_ptr<gfx::Animation> animation_;
24   TabMediaState animatingMediaState_;
25 }
26
27 @property(readonly, nonatomic) TabMediaState mediaState;
28 @property(readonly, nonatomic) TabMediaState animatingMediaState;
29
30 // Initialize a new MediaIndicatorView in TAB_MEDIA_STATE_NONE (i.e., a
31 // non-active indicator).
32 - (id)init;
33
34 // Starts the animation to transition the indicator to the new |mediaState|.
35 - (void)updateIndicator:(TabMediaState)mediaState;
36
37 // Register a callback to be invoked whenever the animation completes.
38 - (void)setAnimationDoneCallbackObject:(id)anObject withSelector:(SEL)selector;
39
40 @end
41
42 @interface MediaIndicatorView(TestingAPI)
43 // Turns off animations for logic testing.
44 - (void)disableAnimations;
45 @end
46
47 #endif  // CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_