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

Side by Side Diff: ash/system/power/tray_power.h

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/monitor/tray_monitor.cc ('k') | ash/system/power/tray_power.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_SYSTEM_POWER_TRAY_POWER_H_ 5 #ifndef ASH_SYSTEM_POWER_TRAY_POWER_H_
6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_ 6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_
7 7
8 #include "ash/system/power/power_status_observer.h" 8 #include "ash/system/power/power_status_observer.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 10
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 enum IconSet { 25 enum IconSet {
26 ICON_LIGHT, 26 ICON_LIGHT,
27 ICON_DARK 27 ICON_DARK
28 }; 28 };
29 29
30 class TrayPower : public SystemTrayItem, 30 class TrayPower : public SystemTrayItem,
31 public PowerStatusObserver { 31 public PowerStatusObserver {
32 public: 32 public:
33 TrayPower(); 33 explicit TrayPower(SystemTray* system_tray);
34 virtual ~TrayPower(); 34 virtual ~TrayPower();
35 35
36 // Gets the icon index in the battery icon array image based on 36 // Gets the icon index in the battery icon array image based on
37 // |supply_status|. If |supply_status| is uncertain about the power state, 37 // |supply_status|. If |supply_status| is uncertain about the power state,
38 // returns -1. 38 // returns -1.
39 static int GetBatteryImageIndex(const PowerSupplyStatus& supply_status); 39 static int GetBatteryImageIndex(const PowerSupplyStatus& supply_status);
40 40
41 // Looks up the actual icon in the icon array image for |image_index|. 41 // Looks up the actual icon in the icon array image for |image_index|.
42 static gfx::ImageSkia GetBatteryImage(int image_index, IconSet icon_set); 42 static gfx::ImageSkia GetBatteryImage(int image_index, IconSet icon_set);
43 43
(...skipping 26 matching lines...) Expand all
70 tray::PowerNotificationView* notification_view_; 70 tray::PowerNotificationView* notification_view_;
71 NotificationState notification_state_; 71 NotificationState notification_state_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(TrayPower); 73 DISALLOW_COPY_AND_ASSIGN(TrayPower);
74 }; 74 };
75 75
76 } // namespace internal 76 } // namespace internal
77 } // namespace ash 77 } // namespace ash
78 78
79 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_ 79 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_
OLDNEW
« no previous file with comments | « ash/system/monitor/tray_monitor.cc ('k') | ash/system/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698