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

Unified Diff: ash/system/chromeos/audio/audio_detailed_view.h

Issue 163953007: Refactor the TrayAudio code so that it can be used by other platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove missing else condition Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/audio/audio_detailed_view.h
diff --git a/ash/system/chromeos/audio/audio_detailed_view.h b/ash/system/chromeos/audio/audio_detailed_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..f86427fd823d2b9af32a09ae5650b51b7e2f96ea
--- /dev/null
+++ b/ash/system/chromeos/audio/audio_detailed_view.h
@@ -0,0 +1,66 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
+#define ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_
+
+#include "ash/system/tray/tray_details_view.h"
+#include "ash/system/tray/view_click_listener.h"
+#include "ash/system/user/login_status.h"
+#include "chromeos/audio/audio_device.h"
+
+#include "ui/gfx/font.h"
+
+namespace views {
+class View;
+}
+
+namespace ash {
+namespace internal {
+
+class HoverHighlightView;
+
+namespace tray {
+
+class AudioDetailedView : public TrayDetailsView,
+ public ViewClickListener {
+ public:
+ AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login);
+
+ virtual ~AudioDetailedView();
+
+ void Update();
+
+ private:
+ void AddScrollListInfoItem(const base::string16& text);
+
+ HoverHighlightView* AddScrollListItem(const base::string16& text,
+ gfx::Font::FontStyle style,
+ bool checked);
+
+ void CreateHeaderEntry();
+ void CreateItems();
+
+ void UpdateScrollableList();
+ void UpdateAudioDevices();
+
+ // Overridden from ViewClickListener.
+ virtual void OnViewClicked(views::View* sender) OVERRIDE;
+
+ user::LoginStatus login_;
+
+ typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap;
+
+ chromeos::AudioDeviceList output_devices_;
+ chromeos::AudioDeviceList input_devices_;
+ AudioDeviceMap device_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioDetailedView);
+};
+
+} // namespace tray
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698