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

Unified Diff: ash/system/chromeos/settings/tray_settings.cc

Issue 357323002: Tray elements behave appropriately on the multiple signin screen (more like lock screen) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix Created 6 years, 5 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/system/chromeos/settings/tray_settings.cc
diff --git a/ash/system/chromeos/settings/tray_settings.cc b/ash/system/chromeos/settings/tray_settings.cc
index bb27a17498c0107a940f049ee4b0ba2ca5d42088..55a1d8ebaf6c11fe7dd90554f585d05411624a46 100644
--- a/ash/system/chromeos/settings/tray_settings.cc
+++ b/ash/system/chromeos/settings/tray_settings.cc
@@ -4,6 +4,7 @@
#include "ash/system/chromeos/settings/tray_settings.h"
+#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/system/chromeos/power/power_status.h"
#include "ash/system/chromeos/power/power_status_view.h"
@@ -41,7 +42,11 @@ class SettingsDefaultView : public ActionableView,
bool power_view_right_align = false;
if (login_status_ != user::LOGGED_IN_NONE &&
- login_status_ != user::LOGGED_IN_LOCKED) {
+ login_status_ != user::LOGGED_IN_LOCKED &&
+ ash::Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetSessionState() !=
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
views::ImageView* icon =
new ash::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
@@ -73,7 +78,11 @@ class SettingsDefaultView : public ActionableView,
// Overridden from ash::ActionableView.
virtual bool PerformAction(const ui::Event& event) OVERRIDE {
if (login_status_ == user::LOGGED_IN_NONE ||
- login_status_ == user::LOGGED_IN_LOCKED)
+ login_status_ == user::LOGGED_IN_LOCKED ||
+ ash::Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY)
return false;
ash::Shell::GetInstance()->system_tray_delegate()->ShowSettings();
@@ -136,7 +145,9 @@ views::View* TraySettings::CreateTrayView(user::LoginStatus status) {
}
views::View* TraySettings::CreateDefaultView(user::LoginStatus status) {
- if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) &&
+ if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED ||
+ ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) &&
!PowerStatus::Get()->IsBatteryPresent())
return NULL;
if (!ash::Shell::GetInstance()->system_tray_delegate()->ShouldShowSettings())

Powered by Google App Engine
This is Rietveld 408576698