| 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" |
| 11 #include "ash/system/user/login_status.h" | 11 #include "ash/system/user/login_status.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 16 #include "ui/views/bubble/tray_bubble_view.h" | 16 #include "ui/views/bubble/tray_bubble_view.h" |
| 17 #include "ui/views/view.h" | 17 #include "ui/views/view.h" |
| 18 | 18 |
| 19 #include <map> | 19 #include <map> |
| 20 #include <vector> | 20 #include <vector> |
| 21 | 21 |
| 22 namespace ash { | 22 namespace ash { |
| 23 class ScreenTrayItem; | |
| 24 class SystemBubbleWrapper; | 23 class SystemBubbleWrapper; |
| 25 class SystemTrayDelegate; | 24 class SystemTrayDelegate; |
| 26 class SystemTrayItem; | 25 class SystemTrayItem; |
| 27 class TrayAccessibility; | 26 class TrayAccessibility; |
| 28 class TrayDate; | 27 class TrayDate; |
| 29 class TrayUser; | 28 class TrayUser; |
| 30 | 29 |
| 31 // There are different methods for creating bubble views. | 30 // There are different methods for creating bubble views. |
| 32 enum BubbleCreationType { | 31 enum BubbleCreationType { |
| 33 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. | 32 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual void BubbleViewDestroyed() OVERRIDE; | 134 virtual void BubbleViewDestroyed() OVERRIDE; |
| 136 virtual void OnMouseEnteredView() OVERRIDE; | 135 virtual void OnMouseEnteredView() OVERRIDE; |
| 137 virtual void OnMouseExitedView() OVERRIDE; | 136 virtual void OnMouseExitedView() OVERRIDE; |
| 138 virtual base::string16 GetAccessibleNameForBubble() OVERRIDE; | 137 virtual base::string16 GetAccessibleNameForBubble() OVERRIDE; |
| 139 virtual gfx::Rect GetAnchorRect( | 138 virtual gfx::Rect GetAnchorRect( |
| 140 views::Widget* anchor_widget, | 139 views::Widget* anchor_widget, |
| 141 AnchorType anchor_type, | 140 AnchorType anchor_type, |
| 142 AnchorAlignment anchor_alignment) const OVERRIDE; | 141 AnchorAlignment anchor_alignment) const OVERRIDE; |
| 143 virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE; | 142 virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE; |
| 144 | 143 |
| 145 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } | |
| 146 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } | |
| 147 | |
| 148 TrayAccessibility* GetTrayAccessibilityForTest() { | 144 TrayAccessibility* GetTrayAccessibilityForTest() { |
| 149 return tray_accessibility_; | 145 return tray_accessibility_; |
| 150 } | 146 } |
| 151 | 147 |
| 152 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. | 148 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. |
| 153 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); | 149 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); |
| 154 | 150 |
| 155 // Gets tray_date_ for browser tests. | 151 // Gets tray_date_ for browser tests. |
| 156 TrayDate* GetTrayDateForTesting() const; | 152 TrayDate* GetTrayDateForTesting() const; |
| 157 | 153 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool hide_notifications_; | 225 bool hide_notifications_; |
| 230 | 226 |
| 231 // This is true when the displayed system tray menu is a full tray menu, | 227 // This is true when the displayed system tray menu is a full tray menu, |
| 232 // otherwise a single line item menu like the volume slider is shown. | 228 // otherwise a single line item menu like the volume slider is shown. |
| 233 // Note that the value is only valid when |system_bubble_| is true. | 229 // Note that the value is only valid when |system_bubble_| is true. |
| 234 bool full_system_tray_menu_; | 230 bool full_system_tray_menu_; |
| 235 | 231 |
| 236 TrayAccessibility* tray_accessibility_; // not owned | 232 TrayAccessibility* tray_accessibility_; // not owned |
| 237 TrayDate* tray_date_; | 233 TrayDate* tray_date_; |
| 238 | 234 |
| 239 // A reference to the Screen share and capture item. | |
| 240 ScreenTrayItem* screen_capture_tray_item_; // not owned | |
| 241 ScreenTrayItem* screen_share_tray_item_; // not owned | |
| 242 | |
| 243 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 235 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 244 }; | 236 }; |
| 245 | 237 |
| 246 } // namespace ash | 238 } // namespace ash |
| 247 | 239 |
| 248 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 240 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |