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

Side by Side Diff: chrome/browser/chromeos/status/power_menu_button.h

Issue 8271024: chromeos: Add power supply info reading capability (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_STATUS_POWER_MENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/cros/power_library.h" 9 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
10 #include "chrome/browser/chromeos/status/status_area_button.h" 10 #include "chrome/browser/chromeos/status/status_area_button.h"
11 #include "views/controls/menu/menu_delegate.h" 11 #include "views/controls/menu/menu_delegate.h"
12 #include "views/controls/menu/view_menu_delegate.h" 12 #include "views/controls/menu/view_menu_delegate.h"
13 13
14 namespace base { 14 namespace base {
15 class TimeDelta; 15 class TimeDelta;
16 } 16 }
17 17
18 namespace views { 18 namespace views {
19 class MenuRunner; 19 class MenuRunner;
20 } 20 }
21 21
22 class SkBitmap; 22 class SkBitmap;
23 23
24 namespace chromeos { 24 namespace chromeos {
25 25
26 class StatusAreaBubbleContentView; 26 class StatusAreaBubbleContentView;
27 27
28 // The power menu button in the status area. 28 // The power menu button in the status area.
29 // This class will handle getting the power status and populating the menu. 29 // This class will handle getting the power status and populating the menu.
30 class PowerMenuButton : public StatusAreaButton, 30 class PowerMenuButton : public StatusAreaButton,
31 public views::MenuDelegate, 31 public views::MenuDelegate,
32 public views::ViewMenuDelegate, 32 public views::ViewMenuDelegate,
33 public PowerLibrary::Observer { 33 public PowerManagerClient::Observer {
34 public: 34 public:
35 explicit PowerMenuButton(StatusAreaButton::Delegate* delegate); 35 explicit PowerMenuButton(StatusAreaButton::Delegate* delegate);
36 virtual ~PowerMenuButton(); 36 virtual ~PowerMenuButton();
37 37
38 // views::MenuDelegate implementation. 38 // views::MenuDelegate implementation.
39 virtual string16 GetLabel(int id) const; 39 virtual string16 GetLabel(int id) const;
40 40
41 // PowerLibrary::Observer implementation. 41 // PowerLibrary::Observer implementation.
42 virtual void PowerChanged(const PowerSupplyStatus& power_status); 42 virtual void PowerChanged(const PowerSupplyStatus& power_status);
43 virtual void SystemResumed() {} 43 virtual void SystemResumed() {}
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // If non-null the menu is showing. 82 // If non-null the menu is showing.
83 scoped_ptr<views::MenuRunner> menu_runner_; 83 scoped_ptr<views::MenuRunner> menu_runner_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton); 85 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton);
86 }; 86 };
87 87
88 } // namespace chromeos 88 } // namespace chromeos
89 89
90 #endif // CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698