| 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 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
| 7 | 7 |
| 8 #include "ash/system/chromeos/power/power_status.h" | 8 #include "ash/system/chromeos/power/power_status.h" |
| 9 #include "ash/system/tray/system_tray_item.h" | 9 #include "ash/system/tray/system_tray_item.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 enum ChargerType{ | 61 enum ChargerType{ |
| 62 UNKNOWN_CHARGER, | 62 UNKNOWN_CHARGER, |
| 63 MAINS_CHARGER, | 63 MAINS_CHARGER, |
| 64 USB_CHARGER, | 64 USB_CHARGER, |
| 65 UNCONFIRMED_SPRING_CHARGER, | 65 UNCONFIRMED_SPRING_CHARGER, |
| 66 SAFE_SPRING_CHARGER, | 66 SAFE_SPRING_CHARGER, |
| 67 CHARGER_TYPE_COUNT, | 67 CHARGER_TYPE_COUNT, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // Overridden from SystemTrayItem. | 70 // Overridden from SystemTrayItem. |
| 71 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 71 virtual views::View* CreateTrayView(user::LoginStatus status) override; |
| 72 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 72 virtual views::View* CreateDefaultView(user::LoginStatus status) override; |
| 73 virtual views::View* CreateNotificationView( | 73 virtual views::View* CreateNotificationView( |
| 74 user::LoginStatus status) OVERRIDE; | 74 user::LoginStatus status) override; |
| 75 virtual void DestroyTrayView() OVERRIDE; | 75 virtual void DestroyTrayView() override; |
| 76 virtual void DestroyDefaultView() OVERRIDE; | 76 virtual void DestroyDefaultView() override; |
| 77 virtual void DestroyNotificationView() OVERRIDE; | 77 virtual void DestroyNotificationView() override; |
| 78 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 78 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) override; |
| 79 virtual void UpdateAfterShelfAlignmentChange( | 79 virtual void UpdateAfterShelfAlignmentChange( |
| 80 ShelfAlignment alignment) OVERRIDE; | 80 ShelfAlignment alignment) override; |
| 81 | 81 |
| 82 // Overridden from PowerStatus::Observer. | 82 // Overridden from PowerStatus::Observer. |
| 83 virtual void OnPowerStatusChanged() OVERRIDE; | 83 virtual void OnPowerStatusChanged() override; |
| 84 | 84 |
| 85 // Show a notification that a low-power USB charger has been connected. | 85 // Show a notification that a low-power USB charger has been connected. |
| 86 // Returns true if a notification was shown or explicitly hidden. | 86 // Returns true if a notification was shown or explicitly hidden. |
| 87 bool MaybeShowUsbChargerNotification(); | 87 bool MaybeShowUsbChargerNotification(); |
| 88 | 88 |
| 89 // Sets |notification_state_|. Returns true if a notification should be shown. | 89 // Sets |notification_state_|. Returns true if a notification should be shown. |
| 90 bool UpdateNotificationState(); | 90 bool UpdateNotificationState(); |
| 91 bool UpdateNotificationStateForRemainingTime(); | 91 bool UpdateNotificationStateForRemainingTime(); |
| 92 bool UpdateNotificationStateForRemainingPercentage(); | 92 bool UpdateNotificationStateForRemainingPercentage(); |
| 93 | 93 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 | 105 |
| 106 // Was line power connected the last time onPowerStatusChanged() was called? | 106 // Was line power connected the last time onPowerStatusChanged() was called? |
| 107 bool line_power_was_connected_; | 107 bool line_power_was_connected_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(TrayPower); | 109 DISALLOW_COPY_AND_ASSIGN(TrayPower); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace ash | 112 } // namespace ash |
| 113 | 113 |
| 114 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 114 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
| OLD | NEW |