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

Unified Diff: ash/system/overview/overview_button_tray.cc

Issue 1149833006: Stop the OverviewButton from appearing on the Add-User screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « ash/system/overview/overview_button_tray.h ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/overview/overview_button_tray.cc
diff --git a/ash/system/overview/overview_button_tray.cc b/ash/system/overview/overview_button_tray.cc
index edd5d67dd0697dd2598133cc5289d83e7511831f..3b34aea30e90074bcd985fafa5ea70492f8c7892 100644
--- a/ash/system/overview/overview_button_tray.cc
+++ b/ash/system/overview/overview_button_tray.cc
@@ -4,6 +4,7 @@
#include "ash/system/overview/overview_button_tray.h"
+#include "ash/session/session_state_delegate.h"
#include "ash/shelf/shelf_types.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -42,10 +43,13 @@ OverviewButtonTray::OverviewButtonTray(StatusAreaWidget* status_area_widget)
tray_container()->AddChildView(icon_);
Shell::GetInstance()->AddShellObserver(this);
+ Shell::GetInstance()->session_state_delegate()->AddSessionStateObserver(this);
}
OverviewButtonTray::~OverviewButtonTray() {
Shell::GetInstance()->RemoveShellObserver(this);
+ Shell::GetInstance()->session_state_delegate()->RemoveSessionStateObserver(
+ this);
}
void OverviewButtonTray::UpdateAfterLoginStatusChange(
@@ -62,6 +66,11 @@ bool OverviewButtonTray::PerformAction(const ui::Event& event) {
return true;
}
+void OverviewButtonTray::SessionStateChanged(
+ SessionStateDelegate::SessionState state) {
+ UpdateIconVisibility();
flackr 2015/05/28 15:20:37 I think this is getting brittle, the logic / respo
jonross 2015/06/01 17:00:37 I've decided to decouple OverviewButton's visibili
+}
+
void OverviewButtonTray::OnMaximizeModeStarted() {
UpdateIconVisibility();
}
« no previous file with comments | « ash/system/overview/overview_button_tray.h ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698