summaryrefslogtreecommitdiffstats
path: root/ash/system/audio/tray_volume.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 01:52:48 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 01:52:48 +0000
commit95a21186f2e3a367061832b2eea61afefb71e573 (patch)
tree155af17e7debece8e3112a1c97fac755af1fb57d /ash/system/audio/tray_volume.h
parent1dc55cd567ffa230519e7508269a747478b3653a (diff)
downloadchromium_src-95a21186f2e3a367061832b2eea61afefb71e573.zip
chromium_src-95a21186f2e3a367061832b2eea61afefb71e573.tar.gz
chromium_src-95a21186f2e3a367061832b2eea61afefb71e573.tar.bz2
ash uber tray: Make it possible for the system to send notifications to the tray.
Volume/Brightness change notifications are sent from the system to the tray. This can be useful to update the tray items when something changes (either automatically, or by means other than the tray itself) BUG=110130,110131 TEST=none Review URL: https://chromiumcodereview.appspot.com/9522003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/audio/tray_volume.h')
-rw-r--r--ash/system/audio/tray_volume.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/ash/system/audio/tray_volume.h b/ash/system/audio/tray_volume.h
index 994f0a0..a5f09b6 100644
--- a/ash/system/audio/tray_volume.h
+++ b/ash/system/audio/tray_volume.h
@@ -6,6 +6,7 @@
#define ASH_SYSTEM_AUDIO_TRAY_VOLUME_H_
#pragma once
+#include "ash/system/audio/audio_controller.h"
#include "ash/system/tray/system_tray_item.h"
#include "base/memory/scoped_ptr.h"
@@ -20,7 +21,8 @@ class VolumeView;
namespace ash {
namespace internal {
-class TrayVolume : public SystemTrayItem {
+class TrayVolume : public SystemTrayItem,
+ public AudioController {
public:
TrayVolume();
virtual ~TrayVolume();
@@ -34,6 +36,9 @@ class TrayVolume : public SystemTrayItem {
virtual void DestroyDefaultView() OVERRIDE;
virtual void DestroyDetailedView() OVERRIDE;
+ // Overridden from AudioController.
+ virtual void OnVolumeChanged(float percent) OVERRIDE;
+
scoped_ptr<tray::VolumeView> volume_view_;
scoped_ptr<views::ImageView> tray_view_;