Home
last modified time | relevance | path

Searched refs:PowerStatus (Results 1 – 14 of 14) sorted by relevance

/external/chromium_org/ash/system/chromeos/power/
Dpower_status_unittest.cc16 class TestObserver : public PowerStatus::Observer {
41 PowerStatus::Initialize(); in SetUp()
42 power_status_ = PowerStatus::Get(); in SetUp()
50 PowerStatus::Shutdown(); in TearDown()
56 PowerStatus* power_status_; // Not owned.
80 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()
82 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()
84 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()
86 EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()
88 EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()
[all …]
Dpower_status.cc68 static PowerStatus* g_power_status = NULL;
82 const int PowerStatus::kMaxBatteryTimeToDisplaySec = 24 * 60 * 60;
85 void PowerStatus::Initialize() { in Initialize()
87 g_power_status = new PowerStatus(); in Initialize()
91 void PowerStatus::Shutdown() { in Shutdown()
98 bool PowerStatus::IsInitialized() { in IsInitialized()
103 PowerStatus* PowerStatus::Get() { in Get()
109 bool PowerStatus::ShouldDisplayBatteryTime(const base::TimeDelta& time) { in ShouldDisplayBatteryTime()
115 void PowerStatus::SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time, in SplitTimeIntoHoursAndMinutes()
125 void PowerStatus::AddObserver(Observer* observer) { in AddObserver()
[all …]
Dtray_power.cc69 SetVisible(PowerStatus::Get()->IsBatteryPresent()); in UpdateStatus()
72 accessible_name_ = PowerStatus::Get()->GetAccessibleNameString(true); in UpdateStatus()
88 SetImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_LIGHT)); in UpdateImage()
142 SetIconImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK)); in UpdateStatus()
170 PowerStatus::Get()->AddObserver(this); in TrayPower()
174 PowerStatus::Get()->RemoveObserver(this); in ~TrayPower()
189 PowerStatus::Get()->RequestStatusUpdate(); in CreateDefaultView()
195 if (!PowerStatus::Get()->IsBatteryPresent()) in CreateNotificationView()
225 if (PowerStatus::Get()->IsOriginalSpringChargerConnected()) { in OnPowerStatusChanged()
250 usb_charger_was_connected_ = PowerStatus::Get()->IsUsbChargerConnected(); in OnPowerStatusChanged()
[all …]
Dpower_status_view.cc38 PowerStatus::Get()->AddObserver(this); in PowerStatusView()
53 PowerStatus::Get()->RemoveObserver(this); in ~PowerStatusView()
62 PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK)); in OnPowerStatusChanged()
105 const PowerStatus& status = *PowerStatus::Get(); in UpdateTextForDefaultView()
126 if (PowerStatus::ShouldDisplayBatteryTime(time) && in UpdateTextForDefaultView()
129 PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min); in UpdateTextForDefaultView()
152 const PowerStatus& status = *PowerStatus::Get(); in UpdateTextForNotificationView()
175 } else if (PowerStatus::ShouldDisplayBatteryTime(time) && in UpdateTextForNotificationView()
178 PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min); in UpdateTextForNotificationView()
Dpower_status.h22 class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {
56 static PowerStatus* Get();
138 PowerStatus();
139 virtual ~PowerStatus();
151 DISALLOW_COPY_AND_ASSIGN(PowerStatus);
Dpower_status_view.h20 public PowerStatus::Observer {
Dtray_power_unittest.cc72 PowerStatus::Get()->SetProtoForTesting(proto); in MaybeShowUsbChargerNotification()
77 PowerStatus::Get()->SetProtoForTesting(proto); in UpdateNotificationState()
Dtray_power.h29 public PowerStatus::Observer {
Dpower_status_view_unittest.cc40 PowerStatus::Get()->SetProtoForTesting(proto); in UpdatePowerStatus()
/external/chromium_org/ash/system/chromeos/settings/
Dtray_settings.cc32 public PowerStatus::Observer {
38 PowerStatus::Get()->AddObserver(this); in SettingsDefaultView()
66 if (PowerStatus::Get()->IsBatteryPresent()) { in SettingsDefaultView()
75 PowerStatus::Get()->RemoveObserver(this); in ~SettingsDefaultView()
115 if (!PowerStatus::Get()->IsBatteryPresent()) in OnPowerStatusChanged()
120 PowerStatus::Get()->GetAccessibleNameString(true) : in OnPowerStatusChanged()
121 PowerStatus::Get()->GetAccessibleNameString(true); in OnPowerStatusChanged()
149 !PowerStatus::Get()->IsBatteryPresent()) in CreateDefaultView()
/external/chromium_org/athena/system/
Dstatus_icon_container_view.cc48 class StatusIconContainerView::PowerStatus class in athena::StatusIconContainerView
51 PowerStatus(SystemUI::ColorScheme color_scheme, in PowerStatus() function in athena::StatusIconContainerView::PowerStatus
62 virtual ~PowerStatus() { in ~PowerStatus()
111 DISALLOW_COPY_AND_ASSIGN(PowerStatus);
233 power_status_.reset(new PowerStatus(color_scheme, battery_view)); in StatusIconContainerView()
Dstatus_icon_container_view.h34 class PowerStatus; variable
35 scoped_ptr<PowerStatus> power_status_;
/external/chromium_org/ash/
Dshell.cc658 PowerStatus::Initialize(); in Shell()
819 PowerStatus::Shutdown(); in ~Shell()
/external/chromium_org/ash/system/tray/
Dsystem_tray.cc408 battery = PowerStatus::Get()->GetAccessibleNameString(false); in GetAccessibleNameForTray()