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

Unified Diff: ash/session/session_controller.cc

Issue 2822033002: cros: Use SessionController to enable system tray settings / notifications tray (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/session/session_controller.cc
diff --git a/ash/session/session_controller.cc b/ash/session/session_controller.cc
index 9e7dd7630c5063f13a1c9c7942394c3512a0f6c9..984bc64679732d4164b8efafbb768c411812bc50 100644
--- a/ash/session/session_controller.cc
+++ b/ash/session/session_controller.cc
@@ -96,6 +96,23 @@ SessionState SessionController::GetSessionState() const {
return state_;
}
+bool SessionController::ShouldEnableSettings() const {
+ // Settings opens a web UI window, so it is not available at the lock screen.
+ if (!IsActiveUserSessionStarted() || IsScreenLocked() ||
+ IsInSecondaryLoginScreen()) {
+ return false;
+ }
+
+ return user_sessions_[0]->should_enable_settings;
+}
+
+bool SessionController::ShouldShowNotificationTray() const {
+ if (!IsActiveUserSessionStarted() || IsInSecondaryLoginScreen())
+ return false;
+
+ return user_sessions_[0]->should_show_notification_tray;
+}
+
const std::vector<mojom::UserSessionPtr>& SessionController::GetUserSessions()
const {
return user_sessions_;

Powered by Google App Engine
This is Rietveld 408576698