| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "mojo/public/cpp/bindings/array.h" | 13 #include "mojo/public/cpp/bindings/array.h" |
| 14 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
| 15 | 15 |
| 16 namespace mus { | 16 namespace mus { |
| 17 | 17 |
| 18 class Window; | 18 class Window; |
| 19 | 19 |
| 20 enum class ChangeType { | 20 enum class ChangeType { |
| 21 ADD_TRANSIENT_WINDOW, | 21 ADD_TRANSIENT_WINDOW, |
| 22 BOUNDS, | 22 BOUNDS, |
| 23 PROPERTY, | 23 PROPERTY, |
| 24 NEW_WINDOW, | 24 NEW_WINDOW, |
| 25 REMOVE_TRANSIENT_WINDOW_FROM_PARENT | 25 RELEASE_CAPTURE, |
| 26 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, |
| 27 SET_CAPTURE |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 // InFlightChange is used to track function calls to the server and take the | 30 // InFlightChange is used to track function calls to the server and take the |
| 29 // appropriate action when the call fails, or the same property changes while | 31 // appropriate action when the call fails, or the same property changes while |
| 30 // waiting for the response. When a function is called on the server an | 32 // waiting for the response. When a function is called on the server an |
| 31 // InFlightChange is created. The function call is complete when | 33 // InFlightChange is created. The function call is complete when |
| 32 // OnChangeCompleted() is received from the server. The following may occur | 34 // OnChangeCompleted() is received from the server. The following may occur |
| 33 // while waiting for a response: | 35 // while waiting for a response: |
| 34 // . A new value is encountered from the server. For example, the bounds of | 36 // . A new value is encountered from the server. For example, the bounds of |
| 35 // a window is locally changed and while waiting for the ack | 37 // a window is locally changed and while waiting for the ack |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 private: | 127 private: |
| 126 const std::string property_name_; | 128 const std::string property_name_; |
| 127 mojo::Array<uint8_t> revert_value_; | 129 mojo::Array<uint8_t> revert_value_; |
| 128 | 130 |
| 129 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange); | 131 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange); |
| 130 }; | 132 }; |
| 131 | 133 |
| 132 } // namespace mus | 134 } // namespace mus |
| 133 | 135 |
| 134 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ | 136 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_IN_FLIGHT_CHANGE_H_ |
| OLD | NEW |