| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | 6 #define ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/system/tray/tray_details_view.h" | 8 #include "ash/system/tray/tray_details_view.h" |
| 9 #include "ash/system/tray/view_click_listener.h" | 9 #include "ash/system/tray/view_click_listener.h" |
| 10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
| 11 #include "chromeos/audio/audio_device.h" | 11 #include "chromeos/audio/audio_device.h" |
| 12 | 12 |
| 13 #include "ui/gfx/font.h" | 13 #include "ui/gfx/font.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class View; | 16 class View; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 class HoverHighlightView; | 20 class HoverHighlightView; |
| 21 | 21 |
| 22 namespace tray { | 22 namespace tray { |
| 23 | 23 |
| 24 class AudioDetailedView : public TrayDetailsView, | 24 class AudioDetailedView : public TrayDetailsView, |
| 25 public ViewClickListener { | 25 public ViewClickListener { |
| 26 public: | 26 public: |
| 27 AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login); | 27 AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login); |
| 28 | 28 |
| 29 virtual ~AudioDetailedView(); | 29 ~AudioDetailedView() override; |
| 30 | 30 |
| 31 void Update(); | 31 void Update(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 void AddScrollListInfoItem(const base::string16& text); | 34 void AddScrollListInfoItem(const base::string16& text); |
| 35 | 35 |
| 36 HoverHighlightView* AddScrollListItem(const base::string16& text, | 36 HoverHighlightView* AddScrollListItem(const base::string16& text, |
| 37 gfx::Font::FontStyle style, | 37 gfx::Font::FontStyle style, |
| 38 bool checked); | 38 bool checked); |
| 39 | 39 |
| 40 void CreateHeaderEntry(); | 40 void CreateHeaderEntry(); |
| 41 void CreateItems(); | 41 void CreateItems(); |
| 42 | 42 |
| 43 void UpdateScrollableList(); | 43 void UpdateScrollableList(); |
| 44 void UpdateAudioDevices(); | 44 void UpdateAudioDevices(); |
| 45 | 45 |
| 46 // Overridden from ViewClickListener. | 46 // Overridden from ViewClickListener. |
| 47 virtual void OnViewClicked(views::View* sender) override; | 47 void OnViewClicked(views::View* sender) override; |
| 48 | 48 |
| 49 user::LoginStatus login_; | 49 user::LoginStatus login_; |
| 50 | 50 |
| 51 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap; | 51 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap; |
| 52 | 52 |
| 53 chromeos::AudioDeviceList output_devices_; | 53 chromeos::AudioDeviceList output_devices_; |
| 54 chromeos::AudioDeviceList input_devices_; | 54 chromeos::AudioDeviceList input_devices_; |
| 55 AudioDeviceMap device_map_; | 55 AudioDeviceMap device_map_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView); | 57 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace tray | 60 } // namespace tray |
| 61 } // namespace ash | 61 } // namespace ash |
| 62 | 62 |
| 63 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ | 63 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ |
| OLD | NEW |