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

Unified Diff: ash/system/power/tray_power.cc

Issue 9837075: Move power_supply_status.* from src/ash to src/chromeos (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix dependency position Created 8 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
Index: ash/system/power/tray_power.cc
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index cae430ad024a7e3cc515c90fd6652096963aba92..7c371dea2768f62c3dd2a738f89638accecab441 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -6,12 +6,12 @@
#include "ash/shell.h"
#include "ash/system/date/date_view.h"
-#include "ash/system/power/power_supply_status.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "chromeos/dbus/power_supply_status.h"
#include "grit/ash_strings.h"
#include "grit/ui_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -53,7 +53,7 @@ class PowerTrayView : public views::ImageView {
virtual ~PowerTrayView() {
}
- void UpdatePowerStatus(const PowerSupplyStatus& status) {
+ void UpdatePowerStatus(const chromeos::PowerSupplyStatus& status) {
supply_status_ = status;
// Sanitize.
if (supply_status_.battery_is_full)
@@ -91,7 +91,7 @@ class PowerTrayView : public views::ImageView {
SetImage(image);
}
- PowerSupplyStatus supply_status_;
+ chromeos::PowerSupplyStatus supply_status_;
DISALLOW_COPY_AND_ASSIGN(PowerTrayView);
};
@@ -107,7 +107,7 @@ class PowerPopupView : public views::Label {
virtual ~PowerPopupView() {
}
- void UpdatePowerStatus(const PowerSupplyStatus& status) {
+ void UpdatePowerStatus(const chromeos::PowerSupplyStatus& status) {
supply_status_ = status;
// Sanitize.
if (supply_status_.battery_is_full)
@@ -141,7 +141,7 @@ class PowerPopupView : public views::Label {
}
}
- PowerSupplyStatus supply_status_;
+ chromeos::PowerSupplyStatus supply_status_;
DISALLOW_COPY_AND_ASSIGN(PowerPopupView);
};
@@ -160,7 +160,7 @@ views::View* TrayPower::CreateTrayView(user::LoginStatus status) {
// There may not be enough information when this is created about whether
// there is a battery or not. So always create this, and adjust visibility as
// necessary.
- PowerSupplyStatus power_status =
+ chromeos::PowerSupplyStatus power_status =
ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus();
power_tray_.reset(new tray::PowerTrayView());
power_tray_->UpdatePowerStatus(power_status);
@@ -181,7 +181,7 @@ views::View* TrayPower::CreateDefaultView(user::LoginStatus status) {
SkColorSetRGB(245, 245, 245)));
container->AddChildView(date_.get());
- PowerSupplyStatus power_status =
+ chromeos::PowerSupplyStatus power_status =
ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus();
if (power_status.battery_is_present) {
power_.reset(new tray::PowerPopupView());
@@ -207,7 +207,8 @@ void TrayPower::DestroyDefaultView() {
void TrayPower::DestroyDetailedView() {
}
-void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) {
+void TrayPower::OnPowerStatusChanged(
+ const chromeos::PowerSupplyStatus& status) {
if (power_tray_.get())
power_tray_->UpdatePowerStatus(status);
if (power_.get())

Powered by Google App Engine
This is Rietveld 408576698