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 COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 6 #define COMPONENTS_MUS_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 12 matching lines...) Expand all Loading... | |
23 enum class Cursor : int32_t; | 23 enum class Cursor : int32_t; |
24 } | 24 } |
25 | 25 |
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 MOVE_LOOP, | |
sky
2016/06/22 23:47:56
nit: keep sorted.
| |
33 CAPTURE, | 34 CAPTURE, |
34 DELETE_WINDOW, | 35 DELETE_WINDOW, |
35 FOCUS, | 36 FOCUS, |
36 NEW_WINDOW, | 37 NEW_WINDOW, |
37 NEW_TOP_LEVEL_WINDOW, | 38 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, |
(...skipping 93 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 InFlightMoveLoopChange(Window* window, const gfx::Rect& revert_bounds); | |
150 | |
151 // InFlightChange: | |
152 void SetRevertValueFrom(const InFlightChange& change) override; | |
153 void Revert() override; | |
154 | |
155 private: | |
156 gfx::Rect revert_bounds_; | |
157 | |
158 DISALLOW_COPY_AND_ASSIGN(InFlightMoveLoopChange); | |
159 }; | |
160 | |
146 // Inflight change that crashes on failure. This is useful for changes that are | 161 // Inflight change that crashes on failure. This is useful for changes that are |
147 // expected to always complete. | 162 // expected to always complete. |
148 class CrashInFlightChange : public InFlightChange { | 163 class CrashInFlightChange : public InFlightChange { |
149 public: | 164 public: |
150 CrashInFlightChange(Window* window, ChangeType type); | 165 CrashInFlightChange(Window* window, ChangeType type); |
151 ~CrashInFlightChange() override; | 166 ~CrashInFlightChange() override; |
152 | 167 |
153 // InFlightChange: | 168 // InFlightChange: |
154 void SetRevertValueFrom(const InFlightChange& change) override; | 169 void SetRevertValueFrom(const InFlightChange& change) override; |
155 void ChangeFailed() override; | 170 void ChangeFailed() override; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
289 void SetRevertValueFrom(const InFlightChange& change) override; | 304 void SetRevertValueFrom(const InFlightChange& change) override; |
290 void Revert() override; | 305 void Revert() override; |
291 | 306 |
292 private: | 307 private: |
293 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); | 308 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); |
294 }; | 309 }; |
295 | 310 |
296 } // namespace mus | 311 } // namespace mus |
297 | 312 |
298 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 313 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
OLD | NEW |