Index: chrome/browser/chromeos/volume_bubble.h |
diff --git a/chrome/browser/chromeos/volume_bubble.h b/chrome/browser/chromeos/volume_bubble.h |
index 17f72fc1a19190531045f546058336a2b61af3e0..f8bf65822819b117d411b8d1691abe1b0540b038 100644 |
--- a/chrome/browser/chromeos/volume_bubble.h |
+++ b/chrome/browser/chromeos/volume_bubble.h |
@@ -8,21 +8,38 @@ |
#include "base/basictypes.h" |
#include "chrome/browser/chromeos/setting_level_bubble.h" |
+#include "views/widget/widget.h" |
template <typename T> struct DefaultSingletonTraits; |
namespace chromeos { |
// Singleton class controlling volume bubble. |
-class VolumeBubble : public SettingLevelBubble { |
+class VolumeBubble : public views::Widget::Observer { |
public: |
+ // Returns the singleton volume bubble instance. |
static VolumeBubble* GetInstance(); |
+ // views::Widget::Observer overrides: |
+ void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
+ |
+ // Updates the target |percent| and icon to be used, sets |
+ // the bubble to |enabled| and shows the bubble. |
+ void ShowBubble(double percent, bool enabled); |
+ |
+ // Hides the bubble. |
+ void HideBubble(); |
+ |
private: |
friend struct DefaultSingletonTraits<VolumeBubble>; |
VolumeBubble(); |
- virtual ~VolumeBubble() {} |
+ virtual ~VolumeBubble(); |
+ |
+ // Bubble widget. |
+ views::Widget* widget_; |
+ |
+ FRIEND_TEST_ALL_PREFIXES(VolumeBubbleTest, GetInstanceAndShow); |
DISALLOW_COPY_AND_ASSIGN(VolumeBubble); |
}; |