Index: ash/system/status_area_widget.h |
diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h |
index 1a99a0f328978735734a87139bf65aa4d3a7e776..8e56688e55657aa5e024e2253eb2d54b074b7a40 100644 |
--- a/ash/system/status_area_widget.h |
+++ b/ash/system/status_area_widget.h |
@@ -11,6 +11,11 @@ |
#include "ui/views/widget/widget.h" |
namespace ash { |
+ |
+class ShellDelegate; |
+class SystemTray; |
+class SystemTrayDelegate; |
+ |
namespace internal { |
class StatusAreaWidgetDelegate; |
@@ -20,11 +25,27 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget { |
StatusAreaWidget(); |
virtual ~StatusAreaWidget(); |
- void AddTray(views::View* tray); |
+ // Creates the SystemTray. |
+ void CreateTrayViews(ShellDelegate* shell_delegate); |
+ |
+ // Destroys the system tray. Called before tearing down the windows to avoid |
+ // shutdown ordering issues. |
+ void Shutdown(); |
+ |
void SetShelfAlignment(ShelfAlignment alignment); |
+ SystemTray* system_tray() { return system_tray_; } |
+ SystemTrayDelegate* system_tray_delegate() { |
+ return system_tray_delegate_.get(); |
+ } |
+ |
private: |
+ void AddSystemTray(SystemTray* system_tray, ShellDelegate* shell_delegate); |
+ |
+ scoped_ptr<SystemTrayDelegate> system_tray_delegate_; |
+ // Weak pointers to View classes that are parented to StatusAreaWidget: |
internal::StatusAreaWidgetDelegate* widget_delegate_; |
+ SystemTray* system_tray_; |
DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
}; |