[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tabs / media_indicator_view.h
blob9dd91ebdeff75ae424fbe23f1eea949fba8b5089
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.
5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/tabs/tab_utils.h"
13 class MediaIndicatorViewAnimationDelegate;
15 namespace gfx {
16 class Animation;
17 } // namespace gfx
19 @interface MediaIndicatorView : NSImageView {
20 @private
21 TabMediaState mediaState_;
22 scoped_ptr<MediaIndicatorViewAnimationDelegate> delegate_;
23 scoped_ptr<gfx::Animation> animation_;
24 TabMediaState animatingMediaState_;
27 @property(readonly, nonatomic) TabMediaState mediaState;
28 @property(readonly, nonatomic) TabMediaState animatingMediaState;
30 // Initialize a new MediaIndicatorView in TAB_MEDIA_STATE_NONE (i.e., a
31 // non-active indicator).
32 - (id)init;
34 // Starts the animation to transition the indicator to the new |mediaState|.
35 - (void)updateIndicator:(TabMediaState)mediaState;
37 // Register a callback to be invoked whenever the animation completes.
38 - (void)setAnimationDoneCallbackObject:(id)anObject withSelector:(SEL)selector;
40 @end
42 @interface MediaIndicatorView(TestingAPI)
43 // Turns off animations for logic testing.
44 - (void)disableAnimations;
45 @end
47 #endif // CHROME_BROWSER_UI_COCOA_TABS_MEDIA_INDICATOR_VIEW_H_