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

Side by Side Diff: ash/system/chromeos/power/tray_power.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 <memory>
9
8 #include "ash/system/chromeos/power/power_status.h" 10 #include "ash/system/chromeos/power/power_status.h"
9 #include "ash/system/tray/system_tray_item.h" 11 #include "ash/system/tray/system_tray_item.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 13
12 class SkBitmap; 14 class SkBitmap;
13 15
14 namespace gfx { 16 namespace gfx {
15 class Image; 17 class Image;
16 class ImageSkia; 18 class ImageSkia;
17 } 19 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Shows a notification when dual-role devices are connected. 94 // Shows a notification when dual-role devices are connected.
93 void MaybeShowDualRoleNotification(); 95 void MaybeShowDualRoleNotification();
94 96
95 // Sets |notification_state_|. Returns true if a notification should be shown. 97 // Sets |notification_state_|. Returns true if a notification should be shown.
96 bool UpdateNotificationState(); 98 bool UpdateNotificationState();
97 bool UpdateNotificationStateForRemainingTime(); 99 bool UpdateNotificationStateForRemainingTime();
98 bool UpdateNotificationStateForRemainingPercentage(); 100 bool UpdateNotificationStateForRemainingPercentage();
99 101
100 message_center::MessageCenter* message_center_; // Not owned. 102 message_center::MessageCenter* message_center_; // Not owned.
101 tray::PowerTrayView* power_tray_; 103 tray::PowerTrayView* power_tray_;
102 scoped_ptr<BatteryNotification> battery_notification_; 104 std::unique_ptr<BatteryNotification> battery_notification_;
103 scoped_ptr<DualRoleNotification> dual_role_notification_; 105 std::unique_ptr<DualRoleNotification> dual_role_notification_;
104 NotificationState notification_state_; 106 NotificationState notification_state_;
105 107
106 // Was a USB charger connected the last time OnPowerStatusChanged() was 108 // Was a USB charger connected the last time OnPowerStatusChanged() was
107 // called? 109 // called?
108 bool usb_charger_was_connected_; 110 bool usb_charger_was_connected_;
109 111
110 // Was line power connected the last time onPowerStatusChanged() was called? 112 // Was line power connected the last time onPowerStatusChanged() was called?
111 bool line_power_was_connected_; 113 bool line_power_was_connected_;
112 114
113 // Has the user already dismissed a low-power notification? Should be set 115 // Has the user already dismissed a low-power notification? Should be set
114 // back to false when all power sources are disconnected. 116 // back to false when all power sources are disconnected.
115 bool usb_notification_dismissed_; 117 bool usb_notification_dismissed_;
116 118
117 DISALLOW_COPY_AND_ASSIGN(TrayPower); 119 DISALLOW_COPY_AND_ASSIGN(TrayPower);
118 }; 120 };
119 121
120 } // namespace ash 122 } // namespace ash
121 123
122 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ 124 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
OLDNEW
« no previous file with comments | « ash/system/chromeos/power/power_status_view_unittest.cc ('k') | ash/system/chromeos/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698