Chromium Code Reviews| 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_VOLUME_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_VOLUME_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; | |
|
msw
2011/10/20 19:36:13
forward decl shouldn't be needed.
alicet1
2011/10/20 22:36:30
Done.
| |
| 16 } | |
| 17 | |
| 14 namespace chromeos { | 18 namespace chromeos { |
| 15 | 19 |
| 16 // Singleton class controlling volume bubble. | 20 // Singleton class controlling volume bubble. |
| 17 class VolumeBubble : public SettingLevelBubble { | 21 class VolumeBubble { |
| 18 public: | 22 public: |
| 23 // Returns a the singleton volume bubble instance. | |
|
msw
2011/10/20 19:36:13
ditto here on dan's comment elsewhere; remove "a"
alicet1
2011/10/20 22:36:30
Done.
| |
| 19 static VolumeBubble* GetInstance(); | 24 static VolumeBubble* GetInstance(); |
| 20 | 25 |
| 26 // Updates the target |percent| and icon to be used, sets | |
| 27 // the bubble to |enabled| and shows the bubble. | |
| 28 void ShowBubble(double percent, bool enabled); | |
| 29 | |
| 30 // hides the bubble. | |
|
msw
2011/10/20 19:36:13
capitalize 'hides'
alicet1
2011/10/20 22:36:30
Done.
| |
| 31 void HideBubble(); | |
| 32 | |
| 21 private: | 33 private: |
| 22 friend struct DefaultSingletonTraits<VolumeBubble>; | 34 friend struct DefaultSingletonTraits<VolumeBubble>; |
| 23 | 35 |
| 36 // Bubble widget, owned by VolumeBubble. | |
| 37 views::Widget* widget_; | |
| 24 VolumeBubble(); | 38 VolumeBubble(); |
| 25 virtual ~VolumeBubble() {} | 39 virtual ~VolumeBubble(); |
| 26 | 40 |
| 27 DISALLOW_COPY_AND_ASSIGN(VolumeBubble); | 41 DISALLOW_COPY_AND_ASSIGN(VolumeBubble); |
| 28 }; | 42 }; |
| 29 | 43 |
| 30 } // namespace chromeos | 44 } // namespace chromeos |
| 31 | 45 |
| 32 #endif // CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_VOLUME_BUBBLE_H_ |
| OLD | NEW |