OLD | NEW |
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/immersive_gesture_handler_aura.h" | 5 #include "ash/wm/immersive_gesture_handler_aura.h" |
6 | 6 |
| 7 #include "ash/shared/immersive_fullscreen_controller.h" |
7 #include "ash/shell.h" | 8 #include "ash/shell.h" |
8 #include "ash/wm/immersive_fullscreen_controller.h" | |
9 #include "ui/aura/client/screen_position_client.h" | 9 #include "ui/aura/client/screen_position_client.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Returns the location of |event| in screen coordinates. | 16 // Returns the location of |event| in screen coordinates. |
17 gfx::Point GetEventLocationInScreen(const ui::LocatedEvent& event) { | 17 gfx::Point GetEventLocationInScreen(const ui::LocatedEvent& event) { |
18 gfx::Point location_in_screen = event.location(); | 18 gfx::Point location_in_screen = event.location(); |
(...skipping 15 matching lines...) Expand all Loading... |
34 ImmersiveGestureHandlerAura::~ImmersiveGestureHandlerAura() { | 34 ImmersiveGestureHandlerAura::~ImmersiveGestureHandlerAura() { |
35 Shell::GetInstance()->RemovePreTargetHandler(this); | 35 Shell::GetInstance()->RemovePreTargetHandler(this); |
36 } | 36 } |
37 | 37 |
38 void ImmersiveGestureHandlerAura::OnGestureEvent(ui::GestureEvent* event) { | 38 void ImmersiveGestureHandlerAura::OnGestureEvent(ui::GestureEvent* event) { |
39 immersive_fullscreen_controller_->OnGestureEvent( | 39 immersive_fullscreen_controller_->OnGestureEvent( |
40 event, GetEventLocationInScreen(*event)); | 40 event, GetEventLocationInScreen(*event)); |
41 } | 41 } |
42 | 42 |
43 } // namespace ash | 43 } // namespace ash |
OLD | NEW |