OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MASH_WM_MOVE_LOOP_H_ | 5 #ifndef MASH_WM_FRAME_MOVE_LOOP_H_ |
6 #define MASH_WM_MOVE_LOOP_H_ | 6 #define MASH_WM_FRAME_MOVE_LOOP_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/mus/public/cpp/window_observer.h" | 10 #include "components/mus/public/cpp/window_observer.h" |
11 #include "components/mus/public/interfaces/input_events.mojom.h" | 11 #include "components/mus/public/interfaces/input_events.mojom.h" |
12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 | 14 |
| 15 namespace mash { |
| 16 namespace wm { |
| 17 |
15 // MoveLoop is responsible for moving/resizing windows. | 18 // MoveLoop is responsible for moving/resizing windows. |
16 class MoveLoop : public mus::WindowObserver { | 19 class MoveLoop : public mus::WindowObserver { |
17 public: | 20 public: |
18 enum MoveResult { | 21 enum MoveResult { |
19 // The move is still ongoing. | 22 // The move is still ongoing. |
20 CONTINUE, | 23 CONTINUE, |
21 | 24 |
22 // The move is done and the MoveLoop should be destroyed. | 25 // The move is done and the MoveLoop should be destroyed. |
23 DONE, | 26 DONE, |
24 }; | 27 }; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 108 |
106 const gfx::Rect initial_user_set_bounds_; | 109 const gfx::Rect initial_user_set_bounds_; |
107 | 110 |
108 // Set to true when MoveLoop changes the bounds of |target_|. The move is | 111 // Set to true when MoveLoop changes the bounds of |target_|. The move is |
109 // canceled if the bounds change unexpectedly during the move. | 112 // canceled if the bounds change unexpectedly during the move. |
110 bool changing_bounds_; | 113 bool changing_bounds_; |
111 | 114 |
112 DISALLOW_COPY_AND_ASSIGN(MoveLoop); | 115 DISALLOW_COPY_AND_ASSIGN(MoveLoop); |
113 }; | 116 }; |
114 | 117 |
115 #endif // MASH_WM_MOVE_LOOP_H_ | 118 } // namespace wm |
| 119 } // namespace mash |
| 120 |
| 121 #endif // MASH_WM_FRAME_MOVE_LOOP_H_ |
OLD | NEW |