OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/browser/chromeos/setting_level_bubble.h" | 10 #include "chrome/browser/chromeos/setting_level_bubble.h" |
11 | 11 |
12 template <typename T> struct DefaultSingletonTraits; | 12 template <typename T> struct DefaultSingletonTraits; |
13 | 13 |
14 namespace views{ | |
15 class Widget; | |
16 } | |
17 | |
14 namespace chromeos { | 18 namespace chromeos { |
15 | 19 |
16 // Singleton class controlling brightness bubble. | 20 // Singleton class controlling brightness bubble. |
17 class BrightnessBubble : public SettingLevelBubble { | 21 class BrightnessBubble { |
18 public: | 22 public: |
19 static BrightnessBubble* GetInstance(); | 23 static BrightnessBubble* GetInstance(); |
24 static void ShowBubble(double percent, bool enabled); | |
25 void UpdateWithoutShowingBubble(int level, bool enabled); | |
26 void HideBubble(); | |
20 | 27 |
21 private: | 28 private: |
22 friend struct DefaultSingletonTraits<BrightnessBubble>; | 29 friend struct DefaultSingletonTraits<BrightnessBubble>; |
23 | 30 |
31 // Bubble widget, owned by VolumeBubble. | |
Daniel Erat
2011/10/19 17:28:09
is this comment incorrect?
alicet1
2011/10/20 15:03:08
updated.
| |
32 static views::Widget* widget_; | |
Daniel Erat
2011/10/19 17:28:09
nit: add a blank line after this
Daniel Erat
2011/10/19 17:28:09
could this be non-static?
alicet1
2011/10/20 15:03:08
Done.
alicet1
2011/10/20 15:03:08
Done.
| |
24 BrightnessBubble(); | 33 BrightnessBubble(); |
25 virtual ~BrightnessBubble() {} | 34 virtual ~BrightnessBubble() {} |
26 | 35 |
27 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); | 36 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); |
28 }; | 37 }; |
29 | 38 |
30 } // namespace chromeos | 39 } // namespace chromeos |
31 | 40 |
32 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ | 41 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ |
OLD | NEW |