| 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_IN_FLIGHT_CHANGE_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 CAPTURE, | 33 CAPTURE, |
| 34 DELETE_WINDOW, | 34 DELETE_WINDOW, |
| 35 DRAG_LOOP, |
| 35 FOCUS, | 36 FOCUS, |
| 36 MOVE_LOOP, | 37 MOVE_LOOP, |
| 37 NEW_TOP_LEVEL_WINDOW, | 38 NEW_TOP_LEVEL_WINDOW, |
| 38 NEW_WINDOW, | 39 NEW_WINDOW, |
| 39 OPACITY, | 40 OPACITY, |
| 40 PREDEFINED_CURSOR, | 41 PREDEFINED_CURSOR, |
| 41 PROPERTY, | 42 PROPERTY, |
| 42 REMOVE_CHILD, | 43 REMOVE_CHILD, |
| 43 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, | 44 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, |
| 44 REORDER, | 45 REORDER, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // InFlightChange: | 138 // InFlightChange: |
| 138 void SetRevertValueFrom(const InFlightChange& change) override; | 139 void SetRevertValueFrom(const InFlightChange& change) override; |
| 139 void Revert() override; | 140 void Revert() override; |
| 140 | 141 |
| 141 private: | 142 private: |
| 142 gfx::Rect revert_bounds_; | 143 gfx::Rect revert_bounds_; |
| 143 | 144 |
| 144 DISALLOW_COPY_AND_ASSIGN(InFlightBoundsChange); | 145 DISALLOW_COPY_AND_ASSIGN(InFlightBoundsChange); |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 class InFlightMoveLoopChange : public InFlightChange { | 148 class InFlightDragChange : public InFlightChange { |
| 148 public: | 149 public: |
| 149 explicit InFlightMoveLoopChange(Window* window); | 150 InFlightDragChange(Window* window, ChangeType type); |
| 150 | 151 |
| 151 // InFlightChange: | 152 // InFlightChange: |
| 152 void SetRevertValueFrom(const InFlightChange& change) override; | 153 void SetRevertValueFrom(const InFlightChange& change) override; |
| 153 void Revert() override; | 154 void Revert() override; |
| 154 | 155 |
| 155 private: | 156 private: |
| 156 DISALLOW_COPY_AND_ASSIGN(InFlightMoveLoopChange); | 157 DISALLOW_COPY_AND_ASSIGN(InFlightDragChange); |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 // Inflight change that crashes on failure. This is useful for changes that are | 160 // Inflight change that crashes on failure. This is useful for changes that are |
| 160 // expected to always complete. | 161 // expected to always complete. |
| 161 class CrashInFlightChange : public InFlightChange { | 162 class CrashInFlightChange : public InFlightChange { |
| 162 public: | 163 public: |
| 163 CrashInFlightChange(Window* window, ChangeType type); | 164 CrashInFlightChange(Window* window, ChangeType type); |
| 164 ~CrashInFlightChange() override; | 165 ~CrashInFlightChange() override; |
| 165 | 166 |
| 166 // InFlightChange: | 167 // InFlightChange: |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 void SetRevertValueFrom(const InFlightChange& change) override; | 303 void SetRevertValueFrom(const InFlightChange& change) override; |
| 303 void Revert() override; | 304 void Revert() override; |
| 304 | 305 |
| 305 private: | 306 private: |
| 306 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); | 307 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); |
| 307 }; | 308 }; |
| 308 | 309 |
| 309 } // namespace ui | 310 } // namespace ui |
| 310 | 311 |
| 311 #endif // SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ | 312 #endif // SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ |
| OLD | NEW |