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

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: Stored result of check on multiple signin screen to local variable 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..3951570f54750cd6d0ee8da534ab49a87c1e8378 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"
@@ -40,8 +41,14 @@ class SettingsDefaultView : public ActionableView,
ash::kTrayPopupPaddingBetweenItems));
bool power_view_right_align = false;
+ bool userAddingRunning =
+ (ash::Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
+
if (login_status_ != user::LOGGED_IN_NONE &&
- login_status_ != user::LOGGED_IN_LOCKED) {
+ login_status_ != user::LOGGED_IN_LOCKED && !userAddingRunning) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
views::ImageView* icon =
new ash::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
@@ -72,8 +79,14 @@ class SettingsDefaultView : public ActionableView,
// Overridden from ash::ActionableView.
virtual bool PerformAction(const ui::Event& event) OVERRIDE {
+ bool userAddingRunning =
+ (ash::Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
+
if (login_status_ == user::LOGGED_IN_NONE ||
- login_status_ == user::LOGGED_IN_LOCKED)
+ login_status_ == user::LOGGED_IN_LOCKED || userAddingRunning)
return false;
ash::Shell::GetInstance()->system_tray_delegate()->ShowSettings();
@@ -136,7 +149,12 @@ 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) &&
+ bool userAddingRunning =
+ (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
+
oshima 2014/08/01 20:31:22 same here. this can be handled by ShouldShowSettin
Roman Sorokin (ftl) 2014/08/05 13:44:09 Done.
+ if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED ||
+ userAddingRunning) &&
!PowerStatus::Get()->IsBatteryPresent())
return NULL;
if (!ash::Shell::GetInstance()->system_tray_delegate()->ShouldShowSettings())

Powered by Google App Engine
This is Rietveld 408576698