 Chromium Code Reviews
 Chromium Code Reviews Issue 1014753003:
  Move low battery notification to Message Center.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1014753003:
  Move low battery notification to Message Center.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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_; | 
| 
Mr4D (OOO till 08-26)
2015/03/17 17:04:37
Practically you do not need a scoped_ptr here - co
 
michaelpg
2015/03/17 18:32:46
Hmm. I had trouble including battery_notification.
 
Mr4D (OOO till 08-26)
2015/03/17 22:25:04
That makes sense! Please do!
 
michaelpg
2015/03/17 23:10:39
Took another look. TrayPower uses NotificationStat
 
Mr4D (OOO till 08-26)
2015/03/20 03:10:53
Okay. Now with your changes it makes sense. Thanks
 | 
| NotificationState notification_state_; | 
| // Was a USB charger connected the last time OnPowerStatusChanged() was |