Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Side by Side Diff: ash/system/status_area_widget.h

Issue 10909220: Removes caching of whether the launcher should be visible from (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: auto-hide Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/status_area_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ShouldShowWebNotifications(); 52 bool ShouldShowWebNotifications();
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 // This sets should_show_launcher_ and calls
61 // ShelfLayoutManager::UpdateAutoHideState() if the state has changed.
62 void UpdateShouldShowLauncher();
63
64 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { 59 internal::StatusAreaWidgetDelegate* status_area_widget_delegate() {
65 return status_area_widget_delegate_; 60 return status_area_widget_delegate_;
66 } 61 }
67 SystemTray* system_tray() { return system_tray_; } 62 SystemTray* system_tray() { return system_tray_; }
68 SystemTrayDelegate* system_tray_delegate() { 63 SystemTrayDelegate* system_tray_delegate() {
69 return system_tray_delegate_.get(); 64 return system_tray_delegate_.get();
70 } 65 }
71 WebNotificationTray* web_notification_tray() { 66 WebNotificationTray* web_notification_tray() {
72 return web_notification_tray_; 67 return web_notification_tray_;
73 } 68 }
74 69
75 user::LoginStatus login_status() const { return login_status_; } 70 user::LoginStatus login_status() const { return login_status_; }
76 71
77 bool should_show_launcher() const { return should_show_launcher_; } 72 // Returns true if the launcher should be visible. This is used when the
73 // launcher is configured to auto-hide and test if the shelf should force
74 // the launcher to remain visible.
75 bool ShouldShowLauncher() const;
78 76
79 private: 77 private:
80 void AddSystemTray(ShellDelegate* shell_delegate); 78 void AddSystemTray(ShellDelegate* shell_delegate);
81 void AddWebNotificationTray(); 79 void AddWebNotificationTray();
82 80
83 scoped_ptr<SystemTrayDelegate> system_tray_delegate_; 81 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
84 // Weak pointers to View classes that are parented to StatusAreaWidget: 82 // Weak pointers to View classes that are parented to StatusAreaWidget:
85 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; 83 internal::StatusAreaWidgetDelegate* status_area_widget_delegate_;
86 SystemTray* system_tray_; 84 SystemTray* system_tray_;
87 WebNotificationTray* web_notification_tray_; 85 WebNotificationTray* web_notification_tray_;
88 user::LoginStatus login_status_; 86 user::LoginStatus login_status_;
89 bool should_show_launcher_;
90 87
91 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); 88 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
92 }; 89 };
93 90
94 } // namespace internal 91 } // namespace internal
95 } // namespace ash 92 } // namespace ash
96 93
97 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 94 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698