| 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 | 14 |
| 15 class OverviewButtonTray; |
| 15 class ShellDelegate; | 16 class ShellDelegate; |
| 16 class SystemTray; | 17 class SystemTray; |
| 17 class WebNotificationTray; | 18 class WebNotificationTray; |
| 18 | 19 |
| 19 namespace internal { | 20 namespace internal { |
| 20 | 21 |
| 21 class StatusAreaWidgetDelegate; | 22 class StatusAreaWidgetDelegate; |
| 22 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 23 class LogoutButtonTray; | 24 class LogoutButtonTray; |
| 24 class VirtualKeyboardTray; | 25 class VirtualKeyboardTray; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 49 // notification tray. | 50 // notification tray. |
| 50 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 51 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
| 51 | 52 |
| 52 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { | 53 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { |
| 53 return status_area_widget_delegate_; | 54 return status_area_widget_delegate_; |
| 54 } | 55 } |
| 55 SystemTray* system_tray() { return system_tray_; } | 56 SystemTray* system_tray() { return system_tray_; } |
| 56 WebNotificationTray* web_notification_tray() { | 57 WebNotificationTray* web_notification_tray() { |
| 57 return web_notification_tray_; | 58 return web_notification_tray_; |
| 58 } | 59 } |
| 60 OverviewButtonTray* overview_button_tray() { |
| 61 return overview_button_tray_; |
| 62 } |
| 59 | 63 |
| 60 user::LoginStatus login_status() const { return login_status_; } | 64 user::LoginStatus login_status() const { return login_status_; } |
| 61 | 65 |
| 62 // Returns true if the shelf should be visible. This is used when the | 66 // Returns true if the shelf should be visible. This is used when the |
| 63 // shelf is configured to auto-hide and test if the shelf should force | 67 // shelf is configured to auto-hide and test if the shelf should force |
| 64 // the shelf to remain visible. | 68 // the shelf to remain visible. |
| 65 bool ShouldShowShelf() const; | 69 bool ShouldShowShelf() const; |
| 66 | 70 |
| 67 // True if any message bubble is shown. | 71 // True if any message bubble is shown. |
| 68 bool IsMessageBubbleShown() const; | 72 bool IsMessageBubbleShown() const; |
| 69 | 73 |
| 70 // Overridden from views::Widget: | 74 // Overridden from views::Widget: |
| 71 virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE; | 75 virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE; |
| 72 | 76 |
| 73 private: | 77 private: |
| 74 void AddSystemTray(); | 78 void AddSystemTray(); |
| 75 void AddWebNotificationTray(); | 79 void AddWebNotificationTray(); |
| 76 #if defined(OS_CHROMEOS) | 80 #if defined(OS_CHROMEOS) |
| 77 void AddLogoutButtonTray(); | 81 void AddLogoutButtonTray(); |
| 78 void AddVirtualKeyboardTray(); | 82 void AddVirtualKeyboardTray(); |
| 79 #endif | 83 #endif |
| 84 void AddOverviewButtonTray(); |
| 80 | 85 |
| 81 // Weak pointers to View classes that are parented to StatusAreaWidget: | 86 // Weak pointers to View classes that are parented to StatusAreaWidget: |
| 82 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; | 87 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; |
| 88 OverviewButtonTray* overview_button_tray_; |
| 83 SystemTray* system_tray_; | 89 SystemTray* system_tray_; |
| 84 WebNotificationTray* web_notification_tray_; | 90 WebNotificationTray* web_notification_tray_; |
| 85 #if defined(OS_CHROMEOS) | 91 #if defined(OS_CHROMEOS) |
| 86 LogoutButtonTray* logout_button_tray_; | 92 LogoutButtonTray* logout_button_tray_; |
| 87 VirtualKeyboardTray* virtual_keyboard_tray_; | 93 VirtualKeyboardTray* virtual_keyboard_tray_; |
| 88 #endif | 94 #endif |
| 89 user::LoginStatus login_status_; | 95 user::LoginStatus login_status_; |
| 90 | 96 |
| 91 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); | 97 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
| 92 }; | 98 }; |
| 93 | 99 |
| 94 } // namespace internal | 100 } // namespace internal |
| 95 } // namespace ash | 101 } // namespace ash |
| 96 | 102 |
| 97 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ | 103 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ |
| OLD | NEW |