Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ash / system / chromeos / audio / audio_detailed_view.h
blobdca993d7cbfa12fd6672d19d3c566c8e4f2f236a
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.
5 #ifndef ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
6 #define ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
8 #include "ash/system/tray/tray_details_view.h"
9 #include "ash/system/tray/view_click_listener.h"
10 #include "chromeos/audio/audio_device.h"
12 #include "ui/gfx/font.h"
14 namespace views {
15 class View;
18 namespace ash {
19 class HoverHighlightView;
21 namespace tray {
23 class AudioDetailedView : public TrayDetailsView,
24 public ViewClickListener {
25 public:
26 explicit AudioDetailedView(SystemTrayItem* owner);
28 ~AudioDetailedView() override;
30 void Update();
32 private:
33 void AddScrollListInfoItem(const base::string16& text);
35 HoverHighlightView* AddScrollListItem(const base::string16& text,
36 bool highlight,
37 bool checked);
39 void CreateHeaderEntry();
40 void CreateItems();
42 void UpdateScrollableList();
43 void UpdateAudioDevices();
45 // Overridden from ViewClickListener.
46 void OnViewClicked(views::View* sender) override;
48 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap;
50 chromeos::AudioDeviceList output_devices_;
51 chromeos::AudioDeviceList input_devices_;
52 AudioDeviceMap device_map_;
54 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView);
57 } // namespace tray
58 } // namespace ash
60 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_