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 SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 15 matching lines...) Expand all Loading... |
26 class Window; | 26 class Window; |
27 class WindowTreeClient; | 27 class WindowTreeClient; |
28 | 28 |
29 enum class ChangeType { | 29 enum class ChangeType { |
30 ADD_CHILD, | 30 ADD_CHILD, |
31 ADD_TRANSIENT_WINDOW, | 31 ADD_TRANSIENT_WINDOW, |
32 BOUNDS, | 32 BOUNDS, |
33 CAPTURE, | 33 CAPTURE, |
34 DELETE_WINDOW, | 34 DELETE_WINDOW, |
35 FOCUS, | 35 FOCUS, |
| 36 MOVE_LOOP, |
| 37 NEW_TOP_LEVEL_WINDOW, |
36 NEW_WINDOW, | 38 NEW_WINDOW, |
37 NEW_TOP_LEVEL_WINDOW, | |
38 OPACITY, | 39 OPACITY, |
39 PREDEFINED_CURSOR, | 40 PREDEFINED_CURSOR, |
40 PROPERTY, | 41 PROPERTY, |
41 REMOVE_CHILD, | 42 REMOVE_CHILD, |
42 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, | 43 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, |
43 REORDER, | 44 REORDER, |
44 SET_MODAL, | 45 SET_MODAL, |
45 VISIBLE, | 46 VISIBLE, |
46 }; | 47 }; |
47 | 48 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // InFlightChange: | 137 // InFlightChange: |
137 void SetRevertValueFrom(const InFlightChange& change) override; | 138 void SetRevertValueFrom(const InFlightChange& change) override; |
138 void Revert() override; | 139 void Revert() override; |
139 | 140 |
140 private: | 141 private: |
141 gfx::Rect revert_bounds_; | 142 gfx::Rect revert_bounds_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(InFlightBoundsChange); | 144 DISALLOW_COPY_AND_ASSIGN(InFlightBoundsChange); |
144 }; | 145 }; |
145 | 146 |
| 147 class InFlightMoveLoopChange : public InFlightChange { |
| 148 public: |
| 149 explicit InFlightMoveLoopChange(Window* window); |
| 150 |
| 151 // InFlightChange: |
| 152 void SetRevertValueFrom(const InFlightChange& change) override; |
| 153 void Revert() override; |
| 154 |
| 155 private: |
| 156 DISALLOW_COPY_AND_ASSIGN(InFlightMoveLoopChange); |
| 157 }; |
| 158 |
146 // Inflight change that crashes on failure. This is useful for changes that are | 159 // Inflight change that crashes on failure. This is useful for changes that are |
147 // expected to always complete. | 160 // expected to always complete. |
148 class CrashInFlightChange : public InFlightChange { | 161 class CrashInFlightChange : public InFlightChange { |
149 public: | 162 public: |
150 CrashInFlightChange(Window* window, ChangeType type); | 163 CrashInFlightChange(Window* window, ChangeType type); |
151 ~CrashInFlightChange() override; | 164 ~CrashInFlightChange() override; |
152 | 165 |
153 // InFlightChange: | 166 // InFlightChange: |
154 void SetRevertValueFrom(const InFlightChange& change) override; | 167 void SetRevertValueFrom(const InFlightChange& change) override; |
155 void ChangeFailed() override; | 168 void ChangeFailed() override; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void SetRevertValueFrom(const InFlightChange& change) override; | 302 void SetRevertValueFrom(const InFlightChange& change) override; |
290 void Revert() override; | 303 void Revert() override; |
291 | 304 |
292 private: | 305 private: |
293 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); | 306 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); |
294 }; | 307 }; |
295 | 308 |
296 } // namespace ui | 309 } // namespace ui |
297 | 310 |
298 #endif // SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 311 #endif // SERVICES_UI_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
OLD | NEW |