Chromium Code Reviews| 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 |
|
oshima
2016/04/08 07:09:41
include?
| |
| 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 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 class SkBitmap; | 12 class SkBitmap; |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Image; | 15 class Image; |
| 16 class ImageSkia; | 16 class ImageSkia; |
| 17 } | 17 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 // Shows a notification when dual-role devices are connected. | 92 // Shows a notification when dual-role devices are connected. |
| 93 void MaybeShowDualRoleNotification(); | 93 void MaybeShowDualRoleNotification(); |
| 94 | 94 |
| 95 // Sets |notification_state_|. Returns true if a notification should be shown. | 95 // Sets |notification_state_|. Returns true if a notification should be shown. |
| 96 bool UpdateNotificationState(); | 96 bool UpdateNotificationState(); |
| 97 bool UpdateNotificationStateForRemainingTime(); | 97 bool UpdateNotificationStateForRemainingTime(); |
| 98 bool UpdateNotificationStateForRemainingPercentage(); | 98 bool UpdateNotificationStateForRemainingPercentage(); |
| 99 | 99 |
| 100 message_center::MessageCenter* message_center_; // Not owned. | 100 message_center::MessageCenter* message_center_; // Not owned. |
| 101 tray::PowerTrayView* power_tray_; | 101 tray::PowerTrayView* power_tray_; |
| 102 scoped_ptr<BatteryNotification> battery_notification_; | 102 std::unique_ptr<BatteryNotification> battery_notification_; |
| 103 scoped_ptr<DualRoleNotification> dual_role_notification_; | 103 std::unique_ptr<DualRoleNotification> dual_role_notification_; |
| 104 NotificationState notification_state_; | 104 NotificationState notification_state_; |
| 105 | 105 |
| 106 // Was a USB charger connected the last time OnPowerStatusChanged() was | 106 // Was a USB charger connected the last time OnPowerStatusChanged() was |
| 107 // called? | 107 // called? |
| 108 bool usb_charger_was_connected_; | 108 bool usb_charger_was_connected_; |
| 109 | 109 |
| 110 // Was line power connected the last time onPowerStatusChanged() was called? | 110 // Was line power connected the last time onPowerStatusChanged() was called? |
| 111 bool line_power_was_connected_; | 111 bool line_power_was_connected_; |
| 112 | 112 |
| 113 // Has the user already dismissed a low-power notification? Should be set | 113 // Has the user already dismissed a low-power notification? Should be set |
| 114 // back to false when all power sources are disconnected. | 114 // back to false when all power sources are disconnected. |
| 115 bool usb_notification_dismissed_; | 115 bool usb_notification_dismissed_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(TrayPower); | 117 DISALLOW_COPY_AND_ASSIGN(TrayPower); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace ash | 120 } // namespace ash |
| 121 | 121 |
| 122 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 122 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
| OLD | NEW |