Home | History | Annotate | Download | only in audio
      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 class HoverHighlightView;
     21 
     22 namespace tray {
     23 
     24 class AudioDetailedView : public TrayDetailsView,
     25                           public ViewClickListener {
     26  public:
     27   AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login);
     28 
     29   virtual ~AudioDetailedView();
     30 
     31   void Update();
     32 
     33  private:
     34   void AddScrollListInfoItem(const base::string16& text);
     35 
     36   HoverHighlightView* AddScrollListItem(const base::string16& text,
     37                                         gfx::Font::FontStyle style,
     38                                         bool checked);
     39 
     40   void CreateHeaderEntry();
     41   void CreateItems();
     42 
     43   void UpdateScrollableList();
     44   void UpdateAudioDevices();
     45 
     46   // Overridden from ViewClickListener.
     47   virtual void OnViewClicked(views::View* sender) OVERRIDE;
     48 
     49   user::LoginStatus login_;
     50 
     51   typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap;
     52 
     53   chromeos::AudioDeviceList output_devices_;
     54   chromeos::AudioDeviceList input_devices_;
     55   AudioDeviceMap device_map_;
     56 
     57   DISALLOW_COPY_AND_ASSIGN(AudioDetailedView);
     58 };
     59 
     60 }  // namespace tray
     61 }  // namespace ash
     62 
     63 #endif  // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
     64