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

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

Issue 17517004: cros: Use custom icon for low-power charger notification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/system/chromeos/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_CHROMEOS_POWER_TRAY_POWER_H_ 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ 6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
7 7
8 #include "ash/system/tray/system_tray_item.h" 8 #include "ash/system/tray/system_tray_item.h"
9 #include "chromeos/power/power_manager_handler.h" 9 #include "chromeos/power/power_manager_handler.h"
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // |supply_status|. 68 // |supply_status|.
69 static int GetBatteryImageOffset( 69 static int GetBatteryImageOffset(
70 const chromeos::PowerSupplyStatus& supply_status); 70 const chromeos::PowerSupplyStatus& supply_status);
71 71
72 // Looks up the actual icon in the icon array image for |image_index|. 72 // Looks up the actual icon in the icon array image for |image_index|.
73 static gfx::ImageSkia GetBatteryImage(int image_index, 73 static gfx::ImageSkia GetBatteryImage(int image_index,
74 int image_offset, 74 int image_offset,
75 bool charging_unreliable, 75 bool charging_unreliable,
76 IconSet icon_set); 76 IconSet icon_set);
77 77
78 // Returns an icon for the USB charger notification.
79 static gfx::Image GetUsbChargerNotificationImage();
80
81 // Gets the battery accessible string for |supply_status|. 78 // Gets the battery accessible string for |supply_status|.
82 static base::string16 GetAccessibleNameString( 79 static base::string16 GetAccessibleNameString(
83 const chromeos::PowerSupplyStatus& supply_status); 80 const chromeos::PowerSupplyStatus& supply_status);
84 81
85 // Gets rounded battery percentage for |battery_percentage|. 82 // Gets rounded battery percentage for |battery_percentage|.
86 static int GetRoundedBatteryPercentage(double battery_percentage); 83 static int GetRoundedBatteryPercentage(double battery_percentage);
87 84
88 private: 85 private:
89 friend class TrayPowerTest; 86 friend class TrayPowerTest;
90 87
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Power supply status at the last update. 124 // Power supply status at the last update.
128 chromeos::PowerSupplyStatus last_power_supply_status_; 125 chromeos::PowerSupplyStatus last_power_supply_status_;
129 126
130 DISALLOW_COPY_AND_ASSIGN(TrayPower); 127 DISALLOW_COPY_AND_ASSIGN(TrayPower);
131 }; 128 };
132 129
133 } // namespace internal 130 } // namespace internal
134 } // namespace ash 131 } // namespace ash
135 132
136 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ 133 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
OLDNEW
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/system/chromeos/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698