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

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

Issue 107103004: Implement the spring charger replacement UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 7 years 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 | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/tray_power.cc
diff --git a/ash/system/chromeos/power/tray_power.cc b/ash/system/chromeos/power/tray_power.cc
index 1eb004840caca6dea72901ec19409310fc870192..6c2c802775d59983c9d242e7bd601e50a0764aab 100644
--- a/ash/system/chromeos/power/tray_power.cc
+++ b/ash/system/chromeos/power/tray_power.cc
@@ -5,9 +5,11 @@
#include "ash/system/chromeos/power/tray_power.h"
#include "ash/ash_switches.h"
+#include "ash/shell.h"
#include "ash/system/chromeos/power/power_status_view.h"
#include "ash/system/date/date_view.h"
#include "ash/system/system_notifier.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_notification_view.h"
#include "ash/system/tray/tray_utils.h"
@@ -162,6 +164,12 @@ void TrayPower::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
void TrayPower::OnPowerStatusChanged() {
+ // Show spring charger replacement dialog if necessary.
Daniel Erat 2013/12/06 18:45:24 nit: remove unnecessary comment
jennyz 2013/12/06 19:11:36 Done.
+ if (PowerStatus::Get()->IsOriginalSpringChargerConnected()) {
+ ash::Shell::GetInstance()->system_tray_delegate()->
+ ShowSpringChargerReplacementDialog();
+ }
+
bool battery_alert = UpdateNotificationState();
if (power_tray_)
power_tray_->UpdateStatus(battery_alert);
« no previous file with comments | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698