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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_event_handler.cc

Issue 2864663002: cros: Merge SystemTrayDelegate::GetUserLoginStatus (Closed)
Patch Set: update PaletteTray to exclude ARC kiosk Created 3 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 unified diff | Download patch
« no previous file with comments | « ash/test/test_system_tray_delegate.cc ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/maximize_mode/maximize_mode_event_handler.h" 5 #include "ash/wm/maximize_mode/maximize_mode_event_handler.h"
6 6
7 #include "ash/session/session_controller.h" 7 #include "ash/session/session_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
11 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
12 #include "ash/wm/wm_event.h" 11 #include "ash/wm/wm_event.h"
13 #include "ash/wm_window.h" 12 #include "ash/wm_window.h"
14 #include "ui/events/event.h" 13 #include "ui/events/event.h"
15 14
16 namespace ash { 15 namespace ash {
17 namespace wm { 16 namespace wm {
18 namespace { 17 namespace {
19 18
(...skipping 28 matching lines...) Expand all
48 return false; 47 return false;
49 48
50 // Test that the touch happened in the top or bottom lines. 49 // Test that the touch happened in the top or bottom lines.
51 int y = event.y(); 50 int y = event.y();
52 if (y >= kLeaveFullScreenAreaHeightInPixel && 51 if (y >= kLeaveFullScreenAreaHeightInPixel &&
53 y < (window->GetBounds().height() - kLeaveFullScreenAreaHeightInPixel)) { 52 y < (window->GetBounds().height() - kLeaveFullScreenAreaHeightInPixel)) {
54 return false; 53 return false;
55 } 54 }
56 55
57 // Do not exit fullscreen in kiosk mode. 56 // Do not exit fullscreen in kiosk mode.
58 SystemTrayDelegate* system_tray_delegate = 57 if (Shell::Get()->session_controller()->IsKioskSession())
59 Shell::Get()->system_tray_delegate();
60 if (system_tray_delegate->GetUserLoginStatus() == LoginStatus::KIOSK_APP ||
61 system_tray_delegate->GetUserLoginStatus() ==
62 LoginStatus::ARC_KIOSK_APP) {
63 return false; 58 return false;
64 }
65 59
66 WMEvent toggle_fullscreen(WM_EVENT_TOGGLE_FULLSCREEN); 60 WMEvent toggle_fullscreen(WM_EVENT_TOGGLE_FULLSCREEN);
67 window->GetWindowState()->OnWMEvent(&toggle_fullscreen); 61 window->GetWindowState()->OnWMEvent(&toggle_fullscreen);
68 return true; 62 return true;
69 } 63 }
70 64
71 } // namespace wm 65 } // namespace wm
72 } // namespace ash 66 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_system_tray_delegate.cc ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698