| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/power/tray_power.h" | 5 #include "ash/system/power/tray_power.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/date/date_view.h" | 9 #include "ash/system/date/date_view.h" |
| 10 #include "ash/system/power/power_status_view.h" | 10 #include "ash/system/power/power_status_view.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 void TrayPower::DestroyDefaultView() { | 191 void TrayPower::DestroyDefaultView() { |
| 192 } | 192 } |
| 193 | 193 |
| 194 void TrayPower::DestroyNotificationView() { | 194 void TrayPower::DestroyNotificationView() { |
| 195 notification_view_ = NULL; | 195 notification_view_ = NULL; |
| 196 } | 196 } |
| 197 | 197 |
| 198 void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 198 void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 199 } | 199 } |
| 200 | 200 |
| 201 void TrayPower::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 202 SetTrayImageItemBorder(power_tray_, alignment); |
| 203 } |
| 204 |
| 201 void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) { | 205 void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) { |
| 202 if (power_tray_) | 206 if (power_tray_) |
| 203 power_tray_->UpdatePowerStatus(status); | 207 power_tray_->UpdatePowerStatus(status); |
| 204 if (notification_view_) | 208 if (notification_view_) |
| 205 notification_view_->UpdatePowerStatus(status); | 209 notification_view_->UpdatePowerStatus(status); |
| 206 | 210 |
| 207 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 211 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 208 switches::kAshNotifyDisabled)) { | 212 switches::kAshNotifyDisabled)) { |
| 209 if (UpdateNotificationState(status)) | 213 if (UpdateNotificationState(status)) |
| 210 ShowNotificationView(); | 214 ShowNotificationView(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 return false; | 249 return false; |
| 246 case NOTIFICATION_CRITICAL: | 250 case NOTIFICATION_CRITICAL: |
| 247 return false; | 251 return false; |
| 248 } | 252 } |
| 249 NOTREACHED(); | 253 NOTREACHED(); |
| 250 return false; | 254 return false; |
| 251 } | 255 } |
| 252 | 256 |
| 253 } // namespace internal | 257 } // namespace internal |
| 254 } // namespace ash | 258 } // namespace ash |
| OLD | NEW |