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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Shows details of a particular item. If |close_delay_in_seconds| is | 65 // Shows details of a particular item. If |close_delay_in_seconds| is |
66 // non-zero, then the view is automatically closed after the specified time. | 66 // non-zero, then the view is automatically closed after the specified time. |
67 void ShowDetailedView(SystemTrayItem* item, | 67 void ShowDetailedView(SystemTrayItem* item, |
68 int close_delay_in_seconds, | 68 int close_delay_in_seconds, |
69 bool activate); | 69 bool activate); |
70 | 70 |
71 // Continue showing the existing detailed view, if any, for |close_delay| | 71 // Continue showing the existing detailed view, if any, for |close_delay| |
72 // seconds. | 72 // seconds. |
73 void SetDetailedViewCloseDelay(int close_delay); | 73 void SetDetailedViewCloseDelay(int close_delay); |
74 | 74 |
| 75 // Hides the detailed view for |item|. |
| 76 void HideDetailedView(SystemTrayItem* item); |
| 77 |
75 // Shows the notification view for |item|. | 78 // Shows the notification view for |item|. |
76 void ShowNotificationView(SystemTrayItem* item); | 79 void ShowNotificationView(SystemTrayItem* item); |
77 | 80 |
78 // Hides the notification view for |item|. | 81 // Hides the notification view for |item|. |
79 void HideNotificationView(SystemTrayItem* item); | 82 void HideNotificationView(SystemTrayItem* item); |
80 | 83 |
81 // Updates the items when the login status of the system changes. | 84 // Updates the items when the login status of the system changes. |
82 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 85 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
83 | 86 |
84 // Sets whether the tray paints a background. Default is true, but is set to | 87 // Sets whether the tray paints a background. Default is true, but is set to |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Overridden from views::View. | 168 // Overridden from views::View. |
166 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 169 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
167 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 170 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
168 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 171 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
169 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 172 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
170 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 173 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
171 | 174 |
172 // Overridden from internal::BackgroundAnimatorDelegate. | 175 // Overridden from internal::BackgroundAnimatorDelegate. |
173 virtual void UpdateBackground(int alpha) OVERRIDE; | 176 virtual void UpdateBackground(int alpha) OVERRIDE; |
174 | 177 |
| 178 // Owned items. |
175 ScopedVector<SystemTrayItem> items_; | 179 ScopedVector<SystemTrayItem> items_; |
176 | 180 |
| 181 // Pointers to members of |items_|. |
| 182 SystemTrayItem* detailed_item_; |
177 std::vector<SystemTrayItem*> notification_items_; | 183 std::vector<SystemTrayItem*> notification_items_; |
178 | 184 |
179 // The container for all the tray views of the items. | 185 // The container for all the tray views of the items. |
180 views::View* tray_container_; | 186 views::View* tray_container_; |
181 | 187 |
182 // These observers are not owned by the tray. | 188 // These observers are not owned by the tray. |
183 AccessibilityObserver* accessibility_observer_; | 189 AccessibilityObserver* accessibility_observer_; |
184 AudioObserver* audio_observer_; | 190 AudioObserver* audio_observer_; |
185 BluetoothObserver* bluetooth_observer_; | 191 BluetoothObserver* bluetooth_observer_; |
186 BrightnessObserver* brightness_observer_; | 192 BrightnessObserver* brightness_observer_; |
(...skipping 25 matching lines...) Expand all Loading... |
212 internal::BackgroundAnimator hover_background_animator_; | 218 internal::BackgroundAnimator hover_background_animator_; |
213 scoped_ptr<internal::SystemTrayLayerAnimationObserver> | 219 scoped_ptr<internal::SystemTrayLayerAnimationObserver> |
214 layer_animation_observer_; | 220 layer_animation_observer_; |
215 | 221 |
216 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 222 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
217 }; | 223 }; |
218 | 224 |
219 } // namespace ash | 225 } // namespace ash |
220 | 226 |
221 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 227 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |