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_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // non-zero, then the view is automatically closed after the specified time. | 73 // non-zero, then the view is automatically closed after the specified time. |
74 void ShowDetailedView(SystemTrayItem* item, | 74 void ShowDetailedView(SystemTrayItem* item, |
75 int close_delay_in_seconds, | 75 int close_delay_in_seconds, |
76 bool activate, | 76 bool activate, |
77 BubbleCreationType creation_type); | 77 BubbleCreationType creation_type); |
78 | 78 |
79 // Continue showing the existing detailed view, if any, for |close_delay| | 79 // Continue showing the existing detailed view, if any, for |close_delay| |
80 // seconds. | 80 // seconds. |
81 void SetDetailedViewCloseDelay(int close_delay); | 81 void SetDetailedViewCloseDelay(int close_delay); |
82 | 82 |
| 83 // Hides the detailed view for |item|. |
| 84 void HideDetailedView(SystemTrayItem* item); |
| 85 |
83 // Shows the notification view for |item|. | 86 // Shows the notification view for |item|. |
84 void ShowNotificationView(SystemTrayItem* item); | 87 void ShowNotificationView(SystemTrayItem* item); |
85 | 88 |
86 // Hides the notification view for |item|. | 89 // Hides the notification view for |item|. |
87 void HideNotificationView(SystemTrayItem* item); | 90 void HideNotificationView(SystemTrayItem* item); |
88 | 91 |
89 // Updates the items when the login status of the system changes. | 92 // Updates the items when the login status of the system changes. |
90 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 93 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
91 | 94 |
92 // Sets whether the tray paints a background. Default is true, but is set to | 95 // Sets whether the tray paints a background. Default is true, but is set to |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Overridden from views::View. | 186 // Overridden from views::View. |
184 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 187 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
185 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 188 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
186 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 189 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
187 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 190 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
188 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 191 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
189 | 192 |
190 // Overridden from internal::BackgroundAnimatorDelegate. | 193 // Overridden from internal::BackgroundAnimatorDelegate. |
191 virtual void UpdateBackground(int alpha) OVERRIDE; | 194 virtual void UpdateBackground(int alpha) OVERRIDE; |
192 | 195 |
| 196 // Owned items. |
193 ScopedVector<SystemTrayItem> items_; | 197 ScopedVector<SystemTrayItem> items_; |
194 | 198 |
| 199 // Pointers to members of |items_|. |
| 200 SystemTrayItem* detailed_item_; |
195 std::vector<SystemTrayItem*> notification_items_; | 201 std::vector<SystemTrayItem*> notification_items_; |
196 | 202 |
197 // The container for all the tray views of the items. | 203 // The container for all the tray views of the items. |
198 views::View* tray_container_; | 204 views::View* tray_container_; |
199 | 205 |
200 // Mappings of system tray item and it's view in the tray. | 206 // Mappings of system tray item and it's view in the tray. |
201 std::map<SystemTrayItem*, views::View*> tray_item_map_; | 207 std::map<SystemTrayItem*, views::View*> tray_item_map_; |
202 | 208 |
203 // These observers are not owned by the tray. | 209 // These observers are not owned by the tray. |
204 AccessibilityObserver* accessibility_observer_; | 210 AccessibilityObserver* accessibility_observer_; |
(...skipping 28 matching lines...) Expand all Loading... |
233 internal::BackgroundAnimator hover_background_animator_; | 239 internal::BackgroundAnimator hover_background_animator_; |
234 scoped_ptr<internal::SystemTrayLayerAnimationObserver> | 240 scoped_ptr<internal::SystemTrayLayerAnimationObserver> |
235 layer_animation_observer_; | 241 layer_animation_observer_; |
236 | 242 |
237 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 243 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
238 }; | 244 }; |
239 | 245 |
240 } // namespace ash | 246 } // namespace ash |
241 | 247 |
242 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 248 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |