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

Unified Diff: chrome/browser/chromeos/brightness_bubble.h

Issue 8319008: aura: brightness and volume bubble. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update the icon Created 9 years, 2 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: chrome/browser/chromeos/brightness_bubble.h
diff --git a/chrome/browser/chromeos/brightness_bubble.h b/chrome/browser/chromeos/brightness_bubble.h
index 7b5ed8c5cf9a47d2b7d197fba0829fb24dda93e3..90b9b1c879b12e5eb086b43da48815e6acc89ddc 100644
--- a/chrome/browser/chromeos/brightness_bubble.h
+++ b/chrome/browser/chromeos/brightness_bubble.h
@@ -8,22 +8,43 @@
#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 brightness bubble.
-class BrightnessBubble : public SettingLevelBubble {
+class BrightnessBubble : public views::Widget::Observer {
public:
+ // Returns the singleton brightness bubble instance.
static BrightnessBubble* 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);
+
+ // Update the bubble |percent| and |enabled| state. See
+ // comments at setting_level_bubble.h.
+ void UpdateWithoutShowingBubble(double percent, bool enabled);
+
+ // Hides the bubble.
+ void HideBubble();
+
private:
friend struct DefaultSingletonTraits<BrightnessBubble>;
BrightnessBubble();
- virtual ~BrightnessBubble() {}
+ virtual ~BrightnessBubble();
+
+ // Bubble widget, owned by BrightnessBubble.
+ views::Widget* widget_;
+ // Whether the bubble widget is closed.
+ bool widget_closed_;
DISALLOW_COPY_AND_ASSIGN(BrightnessBubble);
msw 2011/10/22 00:44:48 Insert a blank line above this macro.
alicet1 2011/10/24 15:46:38 Done.
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/brightness_bubble.cc » ('j') | chrome/browser/chromeos/brightness_bubble.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698