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

Unified Diff: ash/common/system/chromeos/power/power_status.h

Issue 2774093002: Change PowerStatus::GetBatteryImage to not use ExtractImageRep and scale (Closed)
Patch Set: powericon: removedeadunittestcode Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/system/chromeos/power/power_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/power/power_status.h
diff --git a/ash/common/system/chromeos/power/power_status.h b/ash/common/system/chromeos/power/power_status.h
index f94c740b2603ead9faea90b21e0fb67b6616ea44..3435b540eac17400d79c4b4f1b8773d359082038 100644
--- a/ash/common/system/chromeos/power/power_status.h
+++ b/ash/common/system/chromeos/power/power_status.h
@@ -28,9 +28,6 @@ namespace ash {
// available to interested classes within Ash.
class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {
public:
- // Different styles of battery icons.
- enum IconSet { ICON_LIGHT, ICON_DARK };
-
// Interface for classes that wish to be notified when the power status
// has changed.
class Observer {
@@ -192,14 +189,18 @@ class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {
// Returns information about the image that would be returned by
// GetBatteryImage(). This can be cached and compared against future objects
// returned by this method to avoid creating new images unnecessarily.
- BatteryImageInfo GetBatteryImageInfo(IconSet icon_set) const;
+ BatteryImageInfo GetBatteryImageInfo() const;
// A helper function called by GetBatteryImageInfo(). Populates the fields of
// |info|.
void CalculateBatteryImageInfo(BatteryImageInfo* info) const;
+ // The size of the image GetBatteryImage will return, in DIP.
+ static gfx::Size GetBatteryImageSizeInDip();
+
// Creates a new image that should be shown for the battery's current state.
- gfx::ImageSkia GetBatteryImage(const BatteryImageInfo& info) const;
+ gfx::ImageSkiaRep GetBatteryImage(const BatteryImageInfo& info,
+ float scale) const;
// Returns an string describing the current state for accessibility.
base::string16 GetAccessibleNameString(bool full_description) const;
« no previous file with comments | « no previous file | ash/common/system/chromeos/power/power_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698