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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_event_handler.cc

Issue 2718153002: [Merge to M57][Kiosk] Do not allow to exit the fullscreen mode in kiosk mode. (Closed)
Patch Set: Created 3 years, 10 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/common/wm/maximize_mode/maximize_mode_event_handler.cc
diff --git a/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc b/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc
index 8edb1d0d2d9a7c7a863c67fabc33d723435cd1d3..da7750604e366de378f9b0f94c10931b8bc9abde 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc
+++ b/ash/common/wm/maximize_mode/maximize_mode_event_handler.cc
@@ -5,6 +5,7 @@
#include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h"
#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_event.h"
#include "ash/common/wm_shell.h"
@@ -53,6 +54,15 @@ bool MaximizeModeEventHandler::ToggleFullscreen(const ui::TouchEvent& event) {
return false;
}
+ // Do not exit fullscreen in kiosk mode.
+ SystemTrayDelegate* system_tray_delegate =
+ WmShell::Get()->system_tray_delegate();
+ if (system_tray_delegate->GetUserLoginStatus() == LoginStatus::KIOSK_APP ||
+ system_tray_delegate->GetUserLoginStatus() ==
+ LoginStatus::ARC_KIOSK_APP) {
+ return false;
+ }
+
WMEvent toggle_fullscreen(WM_EVENT_TOGGLE_FULLSCREEN);
window->GetWindowState()->OnWMEvent(&toggle_fullscreen);
return true;
« 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