OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/gestures/overview_gesture_handler.h" | 5 #include "ash/wm/gestures/overview_gesture_handler.h" |
6 | 6 |
7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/coordinate_conversion.h" | 9 #include "ash/wm/coordinate_conversion.h" |
10 #include "ash/wm/overview/window_selector_controller.h" | 10 #include "ash/wm/overview/window_selector_controller.h" |
11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
12 #include "ui/events/event.h" | 12 #include "ui/events/event.h" |
13 #include "ui/events/event_constants.h" | 13 #include "ui/events/event_constants.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "ui/gfx/screen.h" | 15 #include "ui/gfx/screen.h" |
16 | 16 |
17 namespace ash { | 17 namespace ash { |
18 namespace internal { | |
19 | |
20 namespace { | 18 namespace { |
21 | 19 |
22 // The number of pixels from the top of the screen (a virtual bezel) to allow | 20 // The number of pixels from the top of the screen (a virtual bezel) to allow |
23 // the overview swipe down gesture to begin within. Note this does not actually | 21 // the overview swipe down gesture to begin within. Note this does not actually |
24 // prevent handling of the touches so a fullscreen page which consumes these can | 22 // prevent handling of the touches so a fullscreen page which consumes these can |
25 // prevent entering overview with a swipe down. | 23 // prevent entering overview with a swipe down. |
26 const int kTopBezelExtraPixels = 5; | 24 const int kTopBezelExtraPixels = 5; |
27 | 25 |
28 // The threshold before engaging overview on a three finger swipe on the | 26 // The threshold before engaging overview on a three finger swipe on the |
29 // touchpad. | 27 // touchpad. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 event.details().touch_points() != 3) { | 97 event.details().touch_points() != 3) { |
100 return false; | 98 return false; |
101 } | 99 } |
102 | 100 |
103 Shell* shell = Shell::GetInstance(); | 101 Shell* shell = Shell::GetInstance(); |
104 shell->metrics()->RecordUserMetricsAction(UMA_GESTURE_OVERVIEW); | 102 shell->metrics()->RecordUserMetricsAction(UMA_GESTURE_OVERVIEW); |
105 shell->window_selector_controller()->ToggleOverview(); | 103 shell->window_selector_controller()->ToggleOverview(); |
106 return true; | 104 return true; |
107 } | 105 } |
108 | 106 |
109 } // namespace internal | |
110 } // namespace ash | 107 } // namespace ash |
OLD | NEW |