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

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: 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 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 #include "views/widget/widget.h"
11 12
12 template <typename T> struct DefaultSingletonTraits; 13 template <typename T> struct DefaultSingletonTraits;
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 // Singleton class controlling brightness bubble. 17 // Singleton class controlling brightness bubble.
17 class BrightnessBubble : public SettingLevelBubble { 18 class BrightnessBubble : public views::Widget::Observer {
18 public: 19 public:
20 // Returns the singleton brightness bubble instance.
19 static BrightnessBubble* GetInstance(); 21 static BrightnessBubble* GetInstance();
20 22
23 // views::Widget::Observer overrides:
24 void OnWidgetClosing(views::Widget* widget) OVERRIDE;
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 |percent| and |enabled| state. See
31 // comments at setting_level_bubble.h.
32 void UpdateWithoutShowingBubble(double percent, 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
24 BrightnessBubble(); 40 BrightnessBubble();
25 virtual ~BrightnessBubble() {} 41 virtual ~BrightnessBubble();
26 42
43 // Bubble widget, owned by BrightnessBubble.
44 views::Widget* widget_;
45
46 // Whether the bubble widget is closed.
47 bool widget_closed_;
27 DISALLOW_COPY_AND_ASSIGN(BrightnessBubble); 48 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.
28 }; 49 };
29 50
30 } // namespace chromeos 51 } // namespace chromeos
31 52
32 #endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_BUBBLE_H_ 53 #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