| 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/cast/tray_cast.h" |
| 9 #include "ash/system/tray/system_tray_bubble.h" | 10 #include "ash/system/tray/system_tray_bubble.h" |
| 10 #include "ash/system/tray/tray_background_view.h" | 11 #include "ash/system/tray/tray_background_view.h" |
| 11 #include "ash/system/user/login_status.h" | 12 #include "ash/system/user/login_status.h" |
| 12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
| 16 #include "ui/views/bubble/tray_bubble_view.h" | 17 #include "ui/views/bubble/tray_bubble_view.h" |
| 17 #include "ui/views/view.h" | 18 #include "ui/views/view.h" |
| 18 | 19 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } | 144 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } |
| 144 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } | 145 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } |
| 145 | 146 |
| 146 TrayAccessibility* GetTrayAccessibilityForTest() { | 147 TrayAccessibility* GetTrayAccessibilityForTest() { |
| 147 return tray_accessibility_; | 148 return tray_accessibility_; |
| 148 } | 149 } |
| 149 | 150 |
| 150 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. | 151 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. |
| 151 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); | 152 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); |
| 152 | 153 |
| 154 // Gets tray_cast_ for browser tests. |
| 155 TrayCast* GetTrayCastForTesting() const; |
| 156 |
| 153 // Gets tray_date_ for browser tests. | 157 // Gets tray_date_ for browser tests. |
| 154 TrayDate* GetTrayDateForTesting() const; | 158 TrayDate* GetTrayDateForTesting() const; |
| 155 | 159 |
| 156 private: | 160 private: |
| 157 // Creates the default set of items for the sytem tray. | 161 // Creates the default set of items for the sytem tray. |
| 158 void CreateItems(SystemTrayDelegate* delegate); | 162 void CreateItems(SystemTrayDelegate* delegate); |
| 159 | 163 |
| 160 // Resets |system_bubble_| and clears any related state. | 164 // Resets |system_bubble_| and clears any related state. |
| 161 void DestroySystemBubble(); | 165 void DestroySystemBubble(); |
| 162 | 166 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Set to true when system notifications should be hidden (e.g. web | 229 // Set to true when system notifications should be hidden (e.g. web |
| 226 // notification bubble is visible). | 230 // notification bubble is visible). |
| 227 bool hide_notifications_; | 231 bool hide_notifications_; |
| 228 | 232 |
| 229 // This is true when the displayed system tray menu is a full tray menu, | 233 // This is true when the displayed system tray menu is a full tray menu, |
| 230 // otherwise a single line item menu like the volume slider is shown. | 234 // otherwise a single line item menu like the volume slider is shown. |
| 231 // Note that the value is only valid when |system_bubble_| is true. | 235 // Note that the value is only valid when |system_bubble_| is true. |
| 232 bool full_system_tray_menu_; | 236 bool full_system_tray_menu_; |
| 233 | 237 |
| 234 TrayAccessibility* tray_accessibility_; // not owned | 238 TrayAccessibility* tray_accessibility_; // not owned |
| 239 TrayCast* tray_cast_; |
| 235 TrayDate* tray_date_; | 240 TrayDate* tray_date_; |
| 236 | 241 |
| 237 // A reference to the Screen share and capture item. | 242 // A reference to the Screen share and capture item. |
| 238 ScreenTrayItem* screen_capture_tray_item_; // not owned | 243 ScreenTrayItem* screen_capture_tray_item_; // not owned |
| 239 ScreenTrayItem* screen_share_tray_item_; // not owned | 244 ScreenTrayItem* screen_share_tray_item_; // not owned |
| 240 | 245 |
| 241 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 246 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 242 }; | 247 }; |
| 243 | 248 |
| 244 } // namespace ash | 249 } // namespace ash |
| 245 | 250 |
| 246 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 251 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |