OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ | |
6 #define ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ | |
7 | |
8 #include "ash/system/audio/audio_observer.h" | |
9 #include "ash/system/tray/tray_image_item.h" | |
10 | |
11 namespace ash { | |
12 | |
13 namespace system { | |
14 class TrayAudioDelegate; | |
15 } | |
16 | |
17 namespace internal { | |
18 | |
19 namespace tray { | |
20 class VolumeView; | |
21 } | |
22 | |
23 class TrayAudio : public TrayImageItem, | |
24 public AudioObserver { | |
25 public: | |
26 TrayAudio(SystemTray* system_tray, system::TrayAudioDelegate* audio_delegate); | |
27 virtual ~TrayAudio(); | |
28 | |
29 protected: | |
30 virtual void Update(); | |
31 | |
32 system::TrayAudioDelegate* audio_delegate_; | |
33 tray::VolumeView* volume_view_; | |
34 | |
35 // True if VolumeView should be created for accelerator pop up; | |
36 // Otherwise, it should be created for detailed view in ash tray bubble. | |
37 bool pop_up_volume_view_; | |
38 | |
39 private: | |
40 // Overridden from TrayImageItem. | |
41 virtual bool GetInitialVisibility() OVERRIDE; | |
42 | |
43 // Overridden from SystemTrayItem. | |
44 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | |
45 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | |
46 virtual void DestroyDefaultView() OVERRIDE; | |
47 virtual void DestroyDetailedView() OVERRIDE; | |
48 virtual bool ShouldHideArrow() const OVERRIDE; | |
49 virtual bool ShouldShowShelf() const OVERRIDE; | |
50 | |
51 // Overridden from AudioObserver. | |
52 virtual void OnOutputVolumeChanged() OVERRIDE; | |
53 virtual void OnOutputMuteChanged() OVERRIDE; | |
54 virtual void OnAudioNodesChanged() OVERRIDE; | |
55 virtual void OnActiveOutputNodeChanged() OVERRIDE; | |
56 virtual void OnActiveInputNodeChanged() OVERRIDE; | |
57 | |
58 DISALLOW_COPY_AND_ASSIGN(TrayAudio); | |
59 }; | |
60 | |
61 } // namespace internal | |
62 } // namespace ash | |
63 | |
64 #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ | |
OLD | NEW |