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_POWER_TRAY_POWER_H_ | 5 #ifndef ASH_SYSTEM_POWER_TRAY_POWER_H_ |
6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_ | 6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_ |
7 | 7 |
8 #include "ash/system/power/power_status_observer.h" | 8 #include "ash/system/power/power_status_observer.h" |
9 #include "ash/system/tray/system_tray_item.h" | 9 #include "ash/system/tray/system_tray_item.h" |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 private: | 44 private: |
45 enum NotificationState { | 45 enum NotificationState { |
46 NOTIFICATION_NONE, | 46 NOTIFICATION_NONE, |
47 NOTIFICATION_LOW_POWER, | 47 NOTIFICATION_LOW_POWER, |
48 NOTIFICATION_CRITICAL | 48 NOTIFICATION_CRITICAL |
49 }; | 49 }; |
50 | 50 |
51 // Overridden from SystemTrayItem. | 51 // Overridden from SystemTrayItem. |
52 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 52 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
53 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 53 virtual views::View* CreateDefaultView(user::LoginStatus status, |
| 54 int bubble_width) OVERRIDE; |
54 virtual views::View* CreateNotificationView( | 55 virtual views::View* CreateNotificationView( |
55 user::LoginStatus status) OVERRIDE; | 56 user::LoginStatus status) OVERRIDE; |
56 virtual void DestroyTrayView() OVERRIDE; | 57 virtual void DestroyTrayView() OVERRIDE; |
57 virtual void DestroyDefaultView() OVERRIDE; | 58 virtual void DestroyDefaultView() OVERRIDE; |
58 virtual void DestroyNotificationView() OVERRIDE; | 59 virtual void DestroyNotificationView() OVERRIDE; |
59 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 60 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
60 virtual void UpdateAfterShelfAlignmentChange( | 61 virtual void UpdateAfterShelfAlignmentChange( |
61 ShelfAlignment alignment) OVERRIDE; | 62 ShelfAlignment alignment) OVERRIDE; |
62 | 63 |
63 // Overridden from PowerStatusObserver. | 64 // Overridden from PowerStatusObserver. |
64 virtual void OnPowerStatusChanged(const PowerSupplyStatus& status) OVERRIDE; | 65 virtual void OnPowerStatusChanged(const PowerSupplyStatus& status) OVERRIDE; |
65 | 66 |
66 // Sets |notification_state_|. Returns true if a notification should be shown. | 67 // Sets |notification_state_|. Returns true if a notification should be shown. |
67 bool UpdateNotificationState(const PowerSupplyStatus& status); | 68 bool UpdateNotificationState(const PowerSupplyStatus& status); |
68 | 69 |
69 tray::PowerTrayView* power_tray_; | 70 tray::PowerTrayView* power_tray_; |
70 tray::PowerNotificationView* notification_view_; | 71 tray::PowerNotificationView* notification_view_; |
71 NotificationState notification_state_; | 72 NotificationState notification_state_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(TrayPower); | 74 DISALLOW_COPY_AND_ASSIGN(TrayPower); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace internal | 77 } // namespace internal |
77 } // namespace ash | 78 } // namespace ash |
78 | 79 |
79 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_ | 80 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_ |
OLD | NEW |