| 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_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "ash/common/system/tray/tray_details_view.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "chromeos/audio/audio_device.h" | |
| 13 | |
| 14 namespace gfx { | |
| 15 struct VectorIcon; | |
| 16 } | |
| 17 | |
| 18 namespace views { | |
| 19 class View; | |
| 20 } | |
| 21 | |
| 22 namespace ash { | |
| 23 class HoverHighlightView; | |
| 24 | |
| 25 namespace tray { | |
| 26 | |
| 27 class AudioDetailedView : public TrayDetailsView { | |
| 28 public: | |
| 29 explicit AudioDetailedView(SystemTrayItem* owner); | |
| 30 | |
| 31 ~AudioDetailedView() override; | |
| 32 | |
| 33 void Update(); | |
| 34 | |
| 35 private: | |
| 36 // Helper functions to add non-clickable header rows within the scrollable | |
| 37 // list. | |
| 38 void AddInputHeader(); | |
| 39 void AddOutputHeader(); | |
| 40 void AddScrollListInfoItem(int text_id, const gfx::VectorIcon& icon); | |
| 41 | |
| 42 HoverHighlightView* AddScrollListItem(const base::string16& text, | |
| 43 bool highlight, | |
| 44 bool checked); | |
| 45 | |
| 46 void CreateItems(); | |
| 47 | |
| 48 void UpdateScrollableList(); | |
| 49 void UpdateAudioDevices(); | |
| 50 | |
| 51 // TrayDetailsView: | |
| 52 void HandleViewClicked(views::View* view) override; | |
| 53 | |
| 54 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap; | |
| 55 | |
| 56 chromeos::AudioDeviceList output_devices_; | |
| 57 chromeos::AudioDeviceList input_devices_; | |
| 58 AudioDeviceMap device_map_; | |
| 59 | |
| 60 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView); | |
| 61 }; | |
| 62 | |
| 63 } // namespace tray | |
| 64 } // namespace ash | |
| 65 | |
| 66 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | |
| OLD | NEW |