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/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void SetHideSystemNotifications(bool hide); | 49 void SetHideSystemNotifications(bool hide); |
50 | 50 |
51 // Returns true if it is OK to show a non system notification. | 51 // Returns true if it is OK to show a non system notification. |
52 bool ShouldShowNonSystemNotifications(); | 52 bool ShouldShowNonSystemNotifications(); |
53 | 53 |
54 // Called by the client when the login status changes. Caches login_status | 54 // Called by the client when the login status changes. Caches login_status |
55 // and calls UpdateAfterLoginStatusChange for the system tray and the web | 55 // and calls UpdateAfterLoginStatusChange for the system tray and the web |
56 // notification tray. | 56 // notification tray. |
57 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 57 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
58 | 58 |
| 59 // Called whenever the launcher auto-hide behavior may need updating. |
| 60 void UpdateShouldShowLauncher(); |
| 61 |
59 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { | 62 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { |
60 return status_area_widget_delegate_; | 63 return status_area_widget_delegate_; |
61 } | 64 } |
62 SystemTray* system_tray() { return system_tray_; } | 65 SystemTray* system_tray() { return system_tray_; } |
63 SystemTrayDelegate* system_tray_delegate() { | 66 SystemTrayDelegate* system_tray_delegate() { |
64 return system_tray_delegate_.get(); | 67 return system_tray_delegate_.get(); |
65 } | 68 } |
66 WebNotificationTray* web_notification_tray() { | 69 WebNotificationTray* web_notification_tray() { |
67 return web_notification_tray_; | 70 return web_notification_tray_; |
68 } | 71 } |
69 | 72 |
70 user::LoginStatus login_status() const { return login_status_; } | 73 user::LoginStatus login_status() const { return login_status_; } |
71 | 74 |
| 75 bool should_show_launcher() const { return should_show_launcher_; } |
| 76 |
72 private: | 77 private: |
73 void AddSystemTray(ShellDelegate* shell_delegate); | 78 void AddSystemTray(ShellDelegate* shell_delegate); |
74 void AddWebNotificationTray(); | 79 void AddWebNotificationTray(); |
75 | 80 |
76 scoped_ptr<SystemTrayDelegate> system_tray_delegate_; | 81 scoped_ptr<SystemTrayDelegate> system_tray_delegate_; |
77 // Weak pointers to View classes that are parented to StatusAreaWidget: | 82 // Weak pointers to View classes that are parented to StatusAreaWidget: |
78 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; | 83 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; |
79 SystemTray* system_tray_; | 84 SystemTray* system_tray_; |
80 WebNotificationTray* web_notification_tray_; | 85 WebNotificationTray* web_notification_tray_; |
81 user::LoginStatus login_status_; | 86 user::LoginStatus login_status_; |
| 87 bool should_show_launcher_; |
82 | 88 |
83 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); | 89 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
84 }; | 90 }; |
85 | 91 |
86 } // namespace internal | 92 } // namespace internal |
87 } // namespace ash | 93 } // namespace ash |
88 | 94 |
89 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ | 95 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ |
OLD | NEW |