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_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
6 #define ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
7 | |
8 #include "ash/system/tray/tray_details_view.h" | |
9 #include "ash/system/tray/view_click_listener.h" | |
10 #include "ash/system/user/login_status.h" | |
11 #include "chromeos/audio/audio_device.h" | |
12 | |
13 #include "ui/gfx/font.h" | |
14 | |
15 namespace views { | |
16 class View; | |
17 } | |
18 | |
19 namespace ash { | |
20 namespace internal { | |
21 | |
22 class HoverHighlightView; | |
23 | |
24 namespace tray { | |
25 | |
26 class AudioDetailedView : public TrayDetailsView, | |
27 public ViewClickListener { | |
28 public: | |
29 AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login); | |
30 | |
31 virtual ~AudioDetailedView(); | |
32 | |
33 void Update(); | |
34 | |
35 private: | |
36 void AddScrollListInfoItem(const base::string16& text); | |
37 | |
38 HoverHighlightView* AddScrollListItem(const base::string16& text, | |
39 gfx::Font::FontStyle style, | |
40 bool checked); | |
41 | |
42 void CreateHeaderEntry(); | |
43 void CreateItems(); | |
44 | |
45 void UpdateScrollableList(); | |
46 void UpdateAudioDevices(); | |
47 | |
48 // Overridden from ViewClickListener. | |
49 virtual void OnViewClicked(views::View* sender) OVERRIDE; | |
50 | |
51 user::LoginStatus login_; | |
52 | |
53 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap; | |
54 | |
55 chromeos::AudioDeviceList output_devices_; | |
56 chromeos::AudioDeviceList input_devices_; | |
57 AudioDeviceMap device_map_; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView); | |
60 }; | |
61 | |
62 } // namespace tray | |
63 } // namespace internal | |
64 } // namespace ash | |
65 | |
66 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
OLD | NEW |