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 chromeos { | 14 namespace chromeos { |
15 | 15 |
16 // Singleton class controlling brightness bubble. | 16 // Singleton class controlling brightness bubble. |
17 class BrightnessBubble : public SettingLevelBubble { | 17 class BrightnessBubble { |
18 public: | 18 public: |
19 // Returns the singleton brightness bubble instance. | |
19 static BrightnessBubble* GetInstance(); | 20 static BrightnessBubble* GetInstance(); |
20 | 21 |
22 // Updates the target |percent| and icon to be used, sets | |
23 // the bubble to |enabled| and shows the bubble. | |
24 void ShowBubble(double percent, bool enabled); | |
25 | |
26 // Update. the bubble |level| and |enabled| state. See | |
msw
2011/10/21 02:42:06
remove period after update
alicet1
2011/10/21 18:11:36
Done.
| |
27 // comments at setting_level_bubble.h. | |
28 void UpdateWithoutShowingBubble(int level, bool enabled); | |
msw
2011/10/21 02:42:06
SettingLevelBubble::UpdateWithoutShowingBubble tak
alicet1
2011/10/21 18:11:36
Done.
| |
29 | |
30 // Hides the bubble. | |
31 void HideBubble(); | |
32 | |
21 private: | 33 private: |
22 friend struct DefaultSingletonTraits<BrightnessBubble>; | 34 friend struct DefaultSingletonTraits<BrightnessBubble>; |
23 | 35 |
36 // Bubble widget, owned by BrightnessBubble. | |
37 views::Widget* widget_; | |
38 | |
24 BrightnessBubble(); | 39 BrightnessBubble(); |
25 virtual ~BrightnessBubble() {} | 40 virtual ~BrightnessBubble(); |
26 | 41 |
27 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); | 42 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); |
28 }; | 43 }; |
29 | 44 |
30 } // namespace chromeos | 45 } // namespace chromeos |
31 | 46 |
32 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ |
OLD | NEW |