| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "mojo/public/cpp/bindings/array.h" | |
| 17 #include "services/ui/public/cpp/window_observer.h" | 16 #include "services/ui/public/cpp/window_observer.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 19 | 18 |
| 20 namespace ui { | 19 namespace ui { |
| 21 | 20 |
| 22 namespace mojom { | 21 namespace mojom { |
| 23 enum class Cursor : int32_t; | 22 enum class Cursor : int32_t; |
| 24 } | 23 } |
| 25 | 24 |
| 26 class Window; | 25 class Window; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 224 |
| 226 // InFlightChange: | 225 // InFlightChange: |
| 227 void Revert() override; | 226 void Revert() override; |
| 228 | 227 |
| 229 private: | 228 private: |
| 230 DISALLOW_COPY_AND_ASSIGN(InFlightFocusChange); | 229 DISALLOW_COPY_AND_ASSIGN(InFlightFocusChange); |
| 231 }; | 230 }; |
| 232 | 231 |
| 233 class InFlightPropertyChange : public InFlightChange { | 232 class InFlightPropertyChange : public InFlightChange { |
| 234 public: | 233 public: |
| 235 InFlightPropertyChange(Window* window, | 234 InFlightPropertyChange( |
| 236 const std::string& property_name, | 235 Window* window, |
| 237 const mojo::Array<uint8_t>& revert_value); | 236 const std::string& property_name, |
| 237 const base::Optional<std::vector<uint8_t>>& revert_value); |
| 238 ~InFlightPropertyChange() override; | 238 ~InFlightPropertyChange() override; |
| 239 | 239 |
| 240 // InFlightChange: | 240 // InFlightChange: |
| 241 bool Matches(const InFlightChange& change) const override; | 241 bool Matches(const InFlightChange& change) const override; |
| 242 void SetRevertValueFrom(const InFlightChange& change) override; | 242 void SetRevertValueFrom(const InFlightChange& change) override; |
| 243 void Revert() override; | 243 void Revert() override; |
| 244 | 244 |
| 245 private: | 245 private: |
| 246 const std::string property_name_; | 246 const std::string property_name_; |
| 247 mojo::Array<uint8_t> revert_value_; | 247 base::Optional<std::vector<uint8_t>> revert_value_; |
| 248 | 248 |
| 249 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange); | 249 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 class InFlightPredefinedCursorChange : public InFlightChange { | 252 class InFlightPredefinedCursorChange : public InFlightChange { |
| 253 public: | 253 public: |
| 254 InFlightPredefinedCursorChange(Window* window, mojom::Cursor revert_value); | 254 InFlightPredefinedCursorChange(Window* window, mojom::Cursor revert_value); |
| 255 ~InFlightPredefinedCursorChange() override; | 255 ~InFlightPredefinedCursorChange() override; |
| 256 | 256 |
| 257 // InFlightChange: | 257 // InFlightChange: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 void SetRevertValueFrom(const InFlightChange& change) override; | 303 void SetRevertValueFrom(const InFlightChange& change) override; |
| 304 void Revert() override; | 304 void Revert() override; |
| 305 | 305 |
| 306 private: | 306 private: |
| 307 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); | 307 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 } // namespace ui | 310 } // namespace ui |
| 311 | 311 |
| 312 #endif // SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ | 312 #endif // SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_ |
| OLD | NEW |