| 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())
|
|
|