| 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_TRAY_SYSTEM_TRAY_ITEM_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
| 10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // type of view. The default implementations return NULL. | 28 // type of view. The default implementations return NULL. |
| 29 | 29 |
| 30 // Returns a view to be displayed in the system tray. If this returns NULL, | 30 // Returns a view to be displayed in the system tray. If this returns NULL, |
| 31 // then this item is not displayed in the tray. | 31 // then this item is not displayed in the tray. |
| 32 // NOTE: The returned view should almost always be a TrayItemView, which | 32 // NOTE: The returned view should almost always be a TrayItemView, which |
| 33 // automatically resizes the widget when the size of the view changes, and | 33 // automatically resizes the widget when the size of the view changes, and |
| 34 // adds animation when the visibility of the view changes. If a view wants to | 34 // adds animation when the visibility of the view changes. If a view wants to |
| 35 // avoid this behavior, then it should not be a TrayItemView. | 35 // avoid this behavior, then it should not be a TrayItemView. |
| 36 virtual views::View* CreateTrayView(user::LoginStatus status); | 36 virtual views::View* CreateTrayView(user::LoginStatus status); |
| 37 | 37 |
| 38 // Returns a view for the item to be displayed in the list. This view can be | 38 // Returns a view for the item to be displayed in the popup list after |
| 39 // displayed with a number of other tray items, so this should not be too | 39 // clicking the system tray. This view can be displayed with a number of other |
| 40 // big. | 40 // tray items, so this should not be too big. |
| 41 virtual views::View* CreateDefaultView(user::LoginStatus status); | 41 virtual views::View* CreateDefaultView(user::LoginStatus status); |
| 42 | 42 |
| 43 // Returns a detailed view for the item. This view is displayed standalone. | 43 // Returns a detailed view for the item. This view is displayed standalone. |
| 44 virtual views::View* CreateDetailedView(user::LoginStatus status); | 44 virtual views::View* CreateDetailedView(user::LoginStatus status); |
| 45 | 45 |
| 46 // Returns a notification view for the item. This view is displayed with | 46 // Returns a notification view for the item. This view is displayed with |
| 47 // other notifications and should be the same size as default views. | 47 // other notifications and should be the same size as default views. |
| 48 virtual views::View* CreateNotificationView(user::LoginStatus status); | 48 virtual views::View* CreateNotificationView(user::LoginStatus status); |
| 49 | 49 |
| 50 // These functions are called when the corresponding view item is about to be | 50 // These functions are called when the corresponding view item is about to be |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 private: | 112 private: |
| 113 SystemTray* system_tray_; | 113 SystemTray* system_tray_; |
| 114 bool restore_focus_; | 114 bool restore_focus_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); | 116 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace ash | 119 } // namespace ash |
| 120 | 120 |
| 121 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ | 121 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| OLD | NEW |