Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: ash/common/system/chromeos/audio/audio_detailed_view.h

Issue 2300353002: Revert of Make TrayDetailsView a ViewClickListener and ButtonListener (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "ash/common/system/tray/tray_details_view.h" 10 #include "ash/common/system/tray/tray_details_view.h"
11 #include "ash/common/system/tray/view_click_listener.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "chromeos/audio/audio_device.h" 13 #include "chromeos/audio/audio_device.h"
13 #include "ui/gfx/font.h" 14 #include "ui/gfx/font.h"
14 15
15 namespace views { 16 namespace views {
16 class View; 17 class View;
17 } 18 }
18 19
19 namespace ash { 20 namespace ash {
20 class HoverHighlightView; 21 class HoverHighlightView;
21 22
22 namespace tray { 23 namespace tray {
23 24
24 class AudioDetailedView : public TrayDetailsView { 25 class AudioDetailedView : public TrayDetailsView, public ViewClickListener {
25 public: 26 public:
26 explicit AudioDetailedView(SystemTrayItem* owner); 27 explicit AudioDetailedView(SystemTrayItem* owner);
27 28
28 ~AudioDetailedView() override; 29 ~AudioDetailedView() override;
29 30
30 void Update(); 31 void Update();
31 32
32 private: 33 private:
33 void AddScrollListInfoItem(const base::string16& text); 34 void AddScrollListInfoItem(const base::string16& text);
34 35
35 HoverHighlightView* AddScrollListItem(const base::string16& text, 36 HoverHighlightView* AddScrollListItem(const base::string16& text,
36 bool highlight, 37 bool highlight,
37 bool checked); 38 bool checked);
38 39
40 void CreateHeaderEntry();
39 void CreateItems(); 41 void CreateItems();
40 42
41 void UpdateScrollableList(); 43 void UpdateScrollableList();
42 void UpdateAudioDevices(); 44 void UpdateAudioDevices();
43 45
44 // TrayDetailsView: 46 // Overridden from ViewClickListener.
45 void HandleViewClicked(views::View* view) override; 47 void OnViewClicked(views::View* sender) override;
46 48
47 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap; 49 typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap;
48 50
49 chromeos::AudioDeviceList output_devices_; 51 chromeos::AudioDeviceList output_devices_;
50 chromeos::AudioDeviceList input_devices_; 52 chromeos::AudioDeviceList input_devices_;
51 AudioDeviceMap device_map_; 53 AudioDeviceMap device_map_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView); 55 DISALLOW_COPY_AND_ASSIGN(AudioDetailedView);
54 }; 56 };
55 57
56 } // namespace tray 58 } // namespace tray
57 } // namespace ash 59 } // namespace ash
58 60
59 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ 61 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
OLDNEW
« no previous file with comments | « ash/common/system/cast/tray_cast.cc ('k') | ash/common/system/chromeos/audio/audio_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698