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

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

Issue 1014753003: Move low battery notification to Message Center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made suggested changes Created 5 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/chromeos/power/tray_power.h
diff --git a/ash/system/chromeos/power/tray_power.h b/ash/system/chromeos/power/tray_power.h
index c8ae131ebd4f90f45c7007dcdb67d043a31ec374..bb1b53037abafe292885ed12d137cf2dcd6d694a 100644
--- a/ash/system/chromeos/power/tray_power.h
+++ b/ash/system/chromeos/power/tray_power.h
@@ -20,15 +20,16 @@ class MessageCenter;
}
namespace ash {
+
+class BatteryNotification;
+
namespace tray {
-class PowerNotificationView;
class PowerTrayView;
}
class ASH_EXPORT TrayPower : public SystemTrayItem,
public PowerStatus::Observer {
public:
- // Visible for testing.
enum NotificationState {
NOTIFICATION_NONE,
@@ -70,10 +71,8 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
// Overridden from SystemTrayItem.
views::View* CreateTrayView(user::LoginStatus status) override;
views::View* CreateDefaultView(user::LoginStatus status) override;
- views::View* CreateNotificationView(user::LoginStatus status) override;
void DestroyTrayView() override;
void DestroyDefaultView() override;
- void DestroyNotificationView() override;
void UpdateAfterLoginStatusChange(user::LoginStatus status) override;
void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
@@ -91,7 +90,7 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
message_center::MessageCenter* message_center_; // Not owned.
tray::PowerTrayView* power_tray_;
- tray::PowerNotificationView* notification_view_;
+ scoped_ptr<BatteryNotification> battery_notification_;
NotificationState notification_state_;
// Was a USB charger connected the last time OnPowerStatusChanged() was

Powered by Google App Engine
This is Rietveld 408576698