Chromium Code Reviews| Index: ash/wm/gestures/shelf_gesture_handler.cc |
| diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc |
| index 61e5a22fe4214f1a82a2a0a17b4aed4e659349ba..3c87d025e022c3db41b7b847bd0137c58c6b2794 100644 |
| --- a/ash/wm/gestures/shelf_gesture_handler.cc |
| +++ b/ash/wm/gestures/shelf_gesture_handler.cc |
| @@ -7,10 +7,10 @@ |
| #include "ash/common/session/session_state_delegate.h" |
| #include "ash/common/shelf/shelf_types.h" |
| #include "ash/common/wm/window_state.h" |
| +#include "ash/common/wm_shell.h" |
| #include "ash/root_window_controller.h" |
| #include "ash/shelf/shelf_layout_manager.h" |
| #include "ash/shelf/shelf_widget.h" |
| -#include "ash/shell.h" |
| #include "ash/system/status_area_widget.h" |
| #include "ash/wm/window_state_aura.h" |
| #include "ash/wm/window_util.h" |
| @@ -29,9 +29,8 @@ ShelfGestureHandler::~ShelfGestureHandler() {} |
| bool ShelfGestureHandler::ProcessGestureEvent( |
| const ui::GestureEvent& event, |
| const aura::Window* event_target_window) { |
| - Shell* shell = Shell::GetInstance(); |
| - if (!shell->session_state_delegate()->NumberOfLoggedInUsers() || |
| - shell->session_state_delegate()->IsScreenLocked()) { |
| + if (!WmShell::Get()->GetSessionStateDelegate()->NumberOfLoggedInUsers() || |
|
James Cook
2016/06/29 21:12:23
optional nit: Cache either WmShell* or Delegate* (
msw
2016/06/29 21:43:34
I often rely on compiler optimizations for such pe
|
| + WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked()) { |
| // The gestures are disabled in the lock/login screen. |
| return false; |
| } |
| @@ -47,7 +46,7 @@ bool ShelfGestureHandler::ProcessGestureEvent( |
| const aura::Window* fullscreen = controller->GetWindowForFullscreenMode(); |
| if (fullscreen && |
| - ash::wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) { |
| + wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) { |
| return false; |
| } |