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

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

Issue 107103004: Implement the spring charger replacement UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 7 years 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 | Annotate | Revision Log
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 "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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Show a notification that a low-power USB charger has been connected. 76 // Show a notification that a low-power USB charger has been connected.
77 // Returns true if a notification was shown or explicitly hidden. 77 // Returns true if a notification was shown or explicitly hidden.
78 bool MaybeShowUsbChargerNotification(); 78 bool MaybeShowUsbChargerNotification();
79 79
80 // Sets |notification_state_|. Returns true if a notification should be shown. 80 // Sets |notification_state_|. Returns true if a notification should be shown.
81 bool UpdateNotificationState(); 81 bool UpdateNotificationState();
82 bool UpdateNotificationStateForRemainingTime(); 82 bool UpdateNotificationStateForRemainingTime();
83 bool UpdateNotificationStateForRemainingPercentage(); 83 bool UpdateNotificationStateForRemainingPercentage();
84 84
85 void ShowChargerReplacementDialogIfNecessary();
86
85 message_center::MessageCenter* message_center_; // Not owned. 87 message_center::MessageCenter* message_center_; // Not owned.
86 tray::PowerTrayView* power_tray_; 88 tray::PowerTrayView* power_tray_;
87 tray::PowerNotificationView* notification_view_; 89 tray::PowerNotificationView* notification_view_;
88 NotificationState notification_state_; 90 NotificationState notification_state_;
89 91
90 // Was a USB charger connected the last time OnPowerStatusChanged() was 92 // Was a USB charger connected the last time OnPowerStatusChanged() was
91 // called? 93 // called?
92 bool usb_charger_was_connected_; 94 bool usb_charger_was_connected_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(TrayPower); 96 DISALLOW_COPY_AND_ASSIGN(TrayPower);
95 }; 97 };
96 98
97 } // namespace internal 99 } // namespace internal
98 } // namespace ash 100 } // namespace ash
99 101
100 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ 102 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698