Chromium Code Reviews| Index: chrome/browser/chromeos/volume_bubble.cc |
| diff --git a/chrome/browser/chromeos/volume_bubble.cc b/chrome/browser/chromeos/volume_bubble.cc |
| index d5c8c9726c81f385343448fe4e5e88477c56596e..f5529c8e844cf7e70400a4fdf254bc44b6ae733b 100644 |
| --- a/chrome/browser/chromeos/volume_bubble.cc |
| +++ b/chrome/browser/chromeos/volume_bubble.cc |
| @@ -7,17 +7,33 @@ |
| #include "base/memory/singleton.h" |
| #include "grit/theme_resources.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "views/widget/widget.h" |
| namespace chromeos { |
| -VolumeBubble::VolumeBubble() |
| - : SettingLevelBubble( |
| - ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| - IDR_VOLUME_BUBBLE_UP_ICON), |
| - ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| - IDR_VOLUME_BUBBLE_DOWN_ICON), |
| - ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| - IDR_VOLUME_BUBBLE_MUTE_ICON)) { |
| +VolumeBubble::VolumeBubble() : widget_(NULL) {} |
|
msw
2011/10/21 02:42:06
Move the private ctor and dtor below the public fu
alicet1
2011/10/21 18:11:36
Done.
|
| + |
| +VolumeBubble::~VolumeBubble() { |
| + delete widget_; |
| + widget_ = NULL; |
| +} |
| + |
| +void VolumeBubble::ShowBubble(double percent, bool enabled) { |
| + widget_= SettingLevelBubble::ShowBubble( |
|
Daniel Erat
2011/10/21 00:25:21
nit: space between 'widget_' and '='
alicet1
2011/10/21 18:11:36
Done.
|
| + widget_, |
| + ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| + IDR_VOLUME_BUBBLE_UP_ICON), |
| + ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| + IDR_VOLUME_BUBBLE_DOWN_ICON), |
| + ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| + IDR_VOLUME_BUBBLE_MUTE_ICON), |
| + percent, |
| + enabled); |
| +} |
| + |
| +void VolumeBubble::HideBubble() { |
| + if (widget_) |
| + widget_->Close(); |
| } |
| // static |