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

Side by Side Diff: ash/wm/tablet_mode/tablet_mode_event_handler.cc

Issue 2906803002: Rename MaximizeMode to TabletMode (Closed)
Patch Set: updated filter 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
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/tablet_mode/tablet_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/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
11 #include "ash/wm/wm_event.h" 11 #include "ash/wm/wm_event.h"
12 #include "ash/wm_window.h" 12 #include "ash/wm_window.h"
13 #include "ui/events/event.h" 13 #include "ui/events/event.h"
14 14
15 namespace ash { 15 namespace ash {
16 namespace wm { 16 namespace wm {
17 namespace { 17 namespace {
18 18
19 // The height of the area in which a touch operation leads to exiting the 19 // The height of the area in which a touch operation leads to exiting the
20 // full screen mode. 20 // full screen mode.
21 const int kLeaveFullScreenAreaHeightInPixel = 2; 21 const int kLeaveFullScreenAreaHeightInPixel = 2;
22 22
23 } // namespace 23 } // namespace
24 24
25 MaximizeModeEventHandler::MaximizeModeEventHandler() {} 25 TabletModeEventHandler::TabletModeEventHandler() {}
26 26
27 MaximizeModeEventHandler::~MaximizeModeEventHandler() {} 27 TabletModeEventHandler::~TabletModeEventHandler() {}
28 28
29 bool MaximizeModeEventHandler::ToggleFullscreen(const ui::TouchEvent& event) { 29 bool TabletModeEventHandler::ToggleFullscreen(const ui::TouchEvent& event) {
30 if (event.type() != ui::ET_TOUCH_PRESSED) 30 if (event.type() != ui::ET_TOUCH_PRESSED)
31 return false; 31 return false;
32 32
33 const SessionController* controller = Shell::Get()->session_controller(); 33 const SessionController* controller = Shell::Get()->session_controller();
34 34
35 if (controller->IsScreenLocked() || 35 if (controller->IsScreenLocked() ||
36 controller->GetSessionState() != session_manager::SessionState::ACTIVE) { 36 controller->GetSessionState() != session_manager::SessionState::ACTIVE) {
37 return false; 37 return false;
38 } 38 }
39 39
(...skipping 17 matching lines...) Expand all
57 if (Shell::Get()->session_controller()->IsKioskSession()) 57 if (Shell::Get()->session_controller()->IsKioskSession())
58 return false; 58 return false;
59 59
60 WMEvent toggle_fullscreen(WM_EVENT_TOGGLE_FULLSCREEN); 60 WMEvent toggle_fullscreen(WM_EVENT_TOGGLE_FULLSCREEN);
61 window->GetWindowState()->OnWMEvent(&toggle_fullscreen); 61 window->GetWindowState()->OnWMEvent(&toggle_fullscreen);
62 return true; 62 return true;
63 } 63 }
64 64
65 } // namespace wm 65 } // namespace wm
66 } // namespace ash 66 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698