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

Side by Side 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: updates 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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;
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 brightness bubble. 20 // Singleton class controlling brightness bubble.
17 class BrightnessBubble : public SettingLevelBubble { 21 class BrightnessBubble {
18 public: 22 public:
23 // Returns a the singleton brightness bubble instance.
Daniel Erat 2011/10/20 15:43:39 nit: delete "a"
alicet1 2011/10/20 22:36:30 Done.
19 static BrightnessBubble* GetInstance(); 24 static BrightnessBubble* 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 // Update the bubble |level| and |enabled| state. See
Daniel Erat 2011/10/20 15:43:39 tiny nit: s/Update/Updates/; add trailing period t
alicet1 2011/10/20 22:36:30 Done.
31 // comments at setting_level_bubble.h
32 void UpdateWithoutShowingBubble(int level, bool enabled);
33
34 // Hides the bubble.
35 void HideBubble();
36
21 private: 37 private:
22 friend struct DefaultSingletonTraits<BrightnessBubble>; 38 friend struct DefaultSingletonTraits<BrightnessBubble>;
23 39
40 // Bubble widget, owned by BrightnessBubble.
41 views::Widget* widget_;
42
24 BrightnessBubble(); 43 BrightnessBubble();
25 virtual ~BrightnessBubble() {} 44 virtual ~BrightnessBubble();
26 45
27 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); 46 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble);
28 }; 47 };
29 48
30 } // namespace chromeos 49 } // namespace chromeos
31 50
32 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ 51 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_
OLDNEW
« 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