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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 2040493003: ChromeOS: disable ToggleMaximize for login and lock screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_window_manager.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
index ccb15427c468a35c104ddd3a1dbeeefec126175f..eede8b9c1b2c918679ccd90c10bdd0330f106c5d 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
@@ -6,6 +6,7 @@
#include "ash/ash_switches.h"
#include "ash/root_window_controller.h"
+#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/common/window_state.h"
@@ -164,6 +165,21 @@ void MaximizeModeWindowManager::OnDisplayMetricsChanged(const display::Display&,
}
void MaximizeModeWindowManager::OnTouchEvent(ui::TouchEvent* event) {
+ const SessionStateDelegate* delegate =
+ Shell::GetInstance()->session_state_delegate();
+
+ if (delegate->IsScreenLocked())
+ return;
+
+ switch (delegate->GetSessionState()) {
+ case SessionStateDelegate::SESSION_STATE_LOGIN_PRIMARY:
+ return;
+ case SessionStateDelegate::SESSION_STATE_ACTIVE:
+ break;
+ case SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY:
+ return;
+ }
+
if (event->type() != ui::ET_TOUCH_PRESSED)
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698