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 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/tray/system_tray_bubble.h" | 9 #include "ash/system/tray/system_tray_bubble.h" |
10 #include "ash/system/tray/tray_background_view.h" | 10 #include "ash/system/tray/tray_background_view.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 private: | 154 private: |
155 // Creates the default set of items for the sytem tray. | 155 // Creates the default set of items for the sytem tray. |
156 void CreateItems(SystemTrayDelegate* delegate); | 156 void CreateItems(SystemTrayDelegate* delegate); |
157 | 157 |
158 // Resets |system_bubble_| and clears any related state. | 158 // Resets |system_bubble_| and clears any related state. |
159 void DestroySystemBubble(); | 159 void DestroySystemBubble(); |
160 | 160 |
161 // Resets |notification_bubble_| and clears any related state. | 161 // Resets |notification_bubble_| and clears any related state. |
162 void DestroyNotificationBubble(); | 162 void DestroyNotificationBubble(); |
163 | 163 |
| 164 // Returns a string with the current time for accessibility on the status |
| 165 // tray bar. |
| 166 base::string16 GetAccessibleTimeString(const base::Time& now) const; |
| 167 |
164 // Calculates the x-offset for the item in the tray. Returns -1 if its tray | 168 // Calculates the x-offset for the item in the tray. Returns -1 if its tray |
165 // item view is not visible. | 169 // item view is not visible. |
166 int GetTrayXOffset(SystemTrayItem* item) const; | 170 int GetTrayXOffset(SystemTrayItem* item) const; |
167 | 171 |
168 // Shows the default view and its arrow position is shifted by |x_offset|. | 172 // Shows the default view and its arrow position is shifted by |x_offset|. |
169 void ShowDefaultViewWithOffset(BubbleCreationType creation_type, | 173 void ShowDefaultViewWithOffset(BubbleCreationType creation_type, |
170 int x_offset, | 174 int x_offset, |
171 bool persistent); | 175 bool persistent); |
172 | 176 |
173 // Constructs or re-constructs |system_bubble_| and populates it with |items|. | 177 // Constructs or re-constructs |system_bubble_| and populates it with |items|. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 231 |
228 TrayAccessibility* tray_accessibility_; // not owned | 232 TrayAccessibility* tray_accessibility_; // not owned |
229 TrayDate* tray_date_; | 233 TrayDate* tray_date_; |
230 | 234 |
231 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 235 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
232 }; | 236 }; |
233 | 237 |
234 } // namespace ash | 238 } // namespace ash |
235 | 239 |
236 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 240 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |