| 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_STATUS_AREA_WIDGET_H_ | 5 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_H_ |
| 6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_H_ | 6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
| 10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
| 11 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | |
| 15 class OverviewButtonTray; | 14 class OverviewButtonTray; |
| 16 class ShellDelegate; | 15 class ShellDelegate; |
| 16 class StatusAreaWidgetDelegate; |
| 17 class SystemTray; | 17 class SystemTray; |
| 18 class WebNotificationTray; | 18 class WebNotificationTray; |
| 19 | |
| 20 namespace internal { | |
| 21 | |
| 22 class StatusAreaWidgetDelegate; | |
| 23 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
| 24 class LogoutButtonTray; | 20 class LogoutButtonTray; |
| 25 class VirtualKeyboardTray; | 21 class VirtualKeyboardTray; |
| 26 #endif | 22 #endif |
| 27 | 23 |
| 28 class ASH_EXPORT StatusAreaWidget : public views::Widget { | 24 class ASH_EXPORT StatusAreaWidget : public views::Widget { |
| 29 public: | 25 public: |
| 30 static const char kNativeViewName[]; | 26 static const char kNativeViewName[]; |
| 31 | 27 |
| 32 explicit StatusAreaWidget(aura::Window* status_container); | 28 explicit StatusAreaWidget(aura::Window* status_container); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 43 void SetShelfAlignment(ShelfAlignment alignment); | 39 void SetShelfAlignment(ShelfAlignment alignment); |
| 44 | 40 |
| 45 // Set the visibility of system notifications. | 41 // Set the visibility of system notifications. |
| 46 void SetHideSystemNotifications(bool hide); | 42 void SetHideSystemNotifications(bool hide); |
| 47 | 43 |
| 48 // Called by the client when the login status changes. Caches login_status | 44 // Called by the client when the login status changes. Caches login_status |
| 49 // and calls UpdateAfterLoginStatusChange for the system tray and the web | 45 // and calls UpdateAfterLoginStatusChange for the system tray and the web |
| 50 // notification tray. | 46 // notification tray. |
| 51 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 47 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
| 52 | 48 |
| 53 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { | 49 StatusAreaWidgetDelegate* status_area_widget_delegate() { |
| 54 return status_area_widget_delegate_; | 50 return status_area_widget_delegate_; |
| 55 } | 51 } |
| 56 SystemTray* system_tray() { return system_tray_; } | 52 SystemTray* system_tray() { return system_tray_; } |
| 57 WebNotificationTray* web_notification_tray() { | 53 WebNotificationTray* web_notification_tray() { |
| 58 return web_notification_tray_; | 54 return web_notification_tray_; |
| 59 } | 55 } |
| 60 OverviewButtonTray* overview_button_tray() { | 56 OverviewButtonTray* overview_button_tray() { |
| 61 return overview_button_tray_; | 57 return overview_button_tray_; |
| 62 } | 58 } |
| 63 | 59 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 77 private: | 73 private: |
| 78 void AddSystemTray(); | 74 void AddSystemTray(); |
| 79 void AddWebNotificationTray(); | 75 void AddWebNotificationTray(); |
| 80 #if defined(OS_CHROMEOS) | 76 #if defined(OS_CHROMEOS) |
| 81 void AddLogoutButtonTray(); | 77 void AddLogoutButtonTray(); |
| 82 void AddVirtualKeyboardTray(); | 78 void AddVirtualKeyboardTray(); |
| 83 #endif | 79 #endif |
| 84 void AddOverviewButtonTray(); | 80 void AddOverviewButtonTray(); |
| 85 | 81 |
| 86 // Weak pointers to View classes that are parented to StatusAreaWidget: | 82 // Weak pointers to View classes that are parented to StatusAreaWidget: |
| 87 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; | 83 StatusAreaWidgetDelegate* status_area_widget_delegate_; |
| 88 OverviewButtonTray* overview_button_tray_; | 84 OverviewButtonTray* overview_button_tray_; |
| 89 SystemTray* system_tray_; | 85 SystemTray* system_tray_; |
| 90 WebNotificationTray* web_notification_tray_; | 86 WebNotificationTray* web_notification_tray_; |
| 91 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
| 92 LogoutButtonTray* logout_button_tray_; | 88 LogoutButtonTray* logout_button_tray_; |
| 93 VirtualKeyboardTray* virtual_keyboard_tray_; | 89 VirtualKeyboardTray* virtual_keyboard_tray_; |
| 94 #endif | 90 #endif |
| 95 user::LoginStatus login_status_; | 91 user::LoginStatus login_status_; |
| 96 | 92 |
| 97 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); | 93 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
| 98 }; | 94 }; |
| 99 | 95 |
| 100 } // namespace internal | |
| 101 } // namespace ash | 96 } // namespace ash |
| 102 | 97 |
| 103 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ | 98 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ |
| OLD | NEW |