OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ |
6 #define ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ | 6 #define ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "ui/gfx/point.h" | 11 #include "ui/gfx/point.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | 14 |
15 namespace internal { | |
16 | |
17 // TwoStepEdgeCycler is responsible for cycling between two modes when the mouse | 15 // TwoStepEdgeCycler is responsible for cycling between two modes when the mouse |
18 // is at the edge of the workspace. The cycler does not loop so it is impossible | 16 // is at the edge of the workspace. The cycler does not loop so it is impossible |
19 // to get back to the first mode once the second mode is reached. | 17 // to get back to the first mode once the second mode is reached. |
20 // TwoStepEdgeCycler should be destroyed once the mouse moves off the edge of | 18 // TwoStepEdgeCycler should be destroyed once the mouse moves off the edge of |
21 // the workspace. | 19 // the workspace. |
22 class ASH_EXPORT TwoStepEdgeCycler { | 20 class ASH_EXPORT TwoStepEdgeCycler { |
23 public: | 21 public: |
24 explicit TwoStepEdgeCycler(const gfx::Point& start); | 22 explicit TwoStepEdgeCycler(const gfx::Point& start); |
25 ~TwoStepEdgeCycler(); | 23 ~TwoStepEdgeCycler(); |
26 | 24 |
(...skipping 12 matching lines...) Expand all Loading... |
39 | 37 |
40 // The number of moves since the cycler was constructed. | 38 // The number of moves since the cycler was constructed. |
41 int num_moves_; | 39 int num_moves_; |
42 | 40 |
43 // Initial x-coordinate. | 41 // Initial x-coordinate. |
44 int start_x_; | 42 int start_x_; |
45 | 43 |
46 DISALLOW_COPY_AND_ASSIGN(TwoStepEdgeCycler); | 44 DISALLOW_COPY_AND_ASSIGN(TwoStepEdgeCycler); |
47 }; | 45 }; |
48 | 46 |
49 } // namespace internal | |
50 } // namespace ash | 47 } // namespace ash |
51 | 48 |
52 #endif // ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ | 49 #endif // ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ |
OLD | NEW |