Searched refs:PowerStatus (Results 1 – 11 of 11) sorted by relevance
62 static PowerStatus* g_power_status = NULL;76 const int PowerStatus::kMaxBatteryTimeToDisplaySec = 24 * 60 * 60;79 void PowerStatus::Initialize() { in Initialize()81 g_power_status = new PowerStatus(); in Initialize()85 void PowerStatus::Shutdown() { in Shutdown()92 bool PowerStatus::IsInitialized() { in IsInitialized()97 PowerStatus* PowerStatus::Get() { in Get()103 bool PowerStatus::ShouldDisplayBatteryTime(const base::TimeDelta& time) { in ShouldDisplayBatteryTime()109 void PowerStatus::SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time, in SplitTimeIntoHoursAndMinutes()120 void PowerStatus::AddObserver(Observer* observer) { in AddObserver()[all …]
22 class TestObserver : public PowerStatus::Observer {47 PowerStatus::Initialize(); in SetUp()48 power_status_ = PowerStatus::Get(); in SetUp()56 PowerStatus::Shutdown(); in TearDown()62 PowerStatus* power_status_; // Not owned.86 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()88 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()90 EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()92 EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()94 EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime( in TEST_F()[all …]
60 SetVisible(PowerStatus::Get()->IsBatteryPresent()); in UpdateStatus()63 accessible_name_ = PowerStatus::Get()->GetAccessibleNameString(); in UpdateStatus()70 SetImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_LIGHT)); in UpdateImage()88 SetIconImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK)); in UpdateStatus()116 PowerStatus::Get()->AddObserver(this); in TrayPower()120 PowerStatus::Get()->RemoveObserver(this); in ~TrayPower()135 PowerStatus::Get()->RequestStatusUpdate(); in CreateDefaultView()141 if (!PowerStatus::Get()->IsBatteryPresent()) in CreateNotificationView()171 if (PowerStatus::Get()->IsOriginalSpringChargerConnected()) { in OnPowerStatusChanged()195 usb_charger_was_connected_ = PowerStatus::Get()->IsUsbChargerConnected(); in OnPowerStatusChanged()[all …]
39 PowerStatus::Get()->AddObserver(this); in PowerStatusView()54 PowerStatus::Get()->RemoveObserver(this); in ~PowerStatusView()63 PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK)); in OnPowerStatusChanged()107 const PowerStatus& status = *PowerStatus::Get(); in UpdateTextForDefaultView()128 if (PowerStatus::ShouldDisplayBatteryTime(time) && in UpdateTextForDefaultView()131 PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min); in UpdateTextForDefaultView()154 const PowerStatus& status = *PowerStatus::Get(); in UpdateTextForNotificationView()177 } else if (PowerStatus::ShouldDisplayBatteryTime(time) && in UpdateTextForNotificationView()180 PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min); in UpdateTextForNotificationView()
23 class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {57 static PowerStatus* Get();139 PowerStatus();140 virtual ~PowerStatus();152 DISALLOW_COPY_AND_ASSIGN(PowerStatus);
19 class PowerStatusView : public views::View, public PowerStatus::Observer {
73 PowerStatus::Get()->SetProtoForTesting(proto); in MaybeShowUsbChargerNotification()78 PowerStatus::Get()->SetProtoForTesting(proto); in UpdateNotificationState()
31 public PowerStatus::Observer {
34 public PowerStatus::Observer {40 PowerStatus::Get()->AddObserver(this); in SettingsDefaultView()63 if (PowerStatus::Get()->IsBatteryPresent()) { in SettingsDefaultView()72 PowerStatus::Get()->RemoveObserver(this); in ~SettingsDefaultView()108 if (!PowerStatus::Get()->IsBatteryPresent()) in OnPowerStatusChanged()113 PowerStatus::Get()->GetAccessibleNameString() : in OnPowerStatusChanged()114 PowerStatus::Get()->GetAccessibleNameString(); in OnPowerStatusChanged()142 !PowerStatus::Get()->IsBatteryPresent()) in CreateDefaultView()
20 status_(chromeos::PowerStatus()) { in PowerLibraryImpl()99 const chromeos::PowerStatus& status) { in PowerStatusChangedHandler()116 void UpdatePowerStatus(const chromeos::PowerStatus& status) { in UpdatePowerStatus()157 chromeos::PowerStatus status_;
590 internal::PowerStatus::Initialize(); in Shell()718 internal::PowerStatus::Shutdown(); in ~Shell()