| 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 #include "ui/aura/mus/in_flight_change.h" | 5 #include "ui/aura/mus/in_flight_change.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/aura_constants.h" | 7 #include "ui/aura/client/aura_constants.h" |
| 8 #include "ui/aura/mus/capture_synchronizer.h" | 8 #include "ui/aura/mus/capture_synchronizer.h" |
| 9 #include "ui/aura/mus/focus_synchronizer.h" | 9 #include "ui/aura/mus/focus_synchronizer.h" |
| 10 #include "ui/aura/mus/window_mus.h" | 10 #include "ui/aura/mus/window_mus.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 bool InFlightChange::Matches(const InFlightChange& change) const { | 25 bool InFlightChange::Matches(const InFlightChange& change) const { |
| 26 DCHECK(change.window_ == window_ && change.change_type_ == change_type_); | 26 DCHECK(change.window_ == window_ && change.change_type_ == change_type_); |
| 27 return true; | 27 return true; |
| 28 } | 28 } |
| 29 | 29 |
| 30 void InFlightChange::ChangeFailed() {} | 30 void InFlightChange::ChangeFailed() {} |
| 31 | 31 |
| 32 // InFlightBoundsChange ------------------------------------------------------- | 32 // InFlightBoundsChange ------------------------------------------------------- |
| 33 | 33 |
| 34 InFlightBoundsChange::InFlightBoundsChange(WindowTreeClient* window_tree_client, | 34 InFlightBoundsChange::InFlightBoundsChange( |
| 35 WindowMus* window, | 35 WindowTreeClient* window_tree_client, |
| 36 const gfx::Rect& revert_bounds) | 36 WindowMus* window, |
| 37 const gfx::Rect& revert_bounds, |
| 38 const base::Optional<cc::LocalSurfaceId>& revert_local_surface_id) |
| 37 : InFlightChange(window, ChangeType::BOUNDS), | 39 : InFlightChange(window, ChangeType::BOUNDS), |
| 38 window_tree_client_(window_tree_client), | 40 window_tree_client_(window_tree_client), |
| 39 revert_bounds_(revert_bounds) {} | 41 revert_bounds_(revert_bounds), |
| 42 revert_local_surface_id_(revert_local_surface_id) {} |
| 43 |
| 44 InFlightBoundsChange::~InFlightBoundsChange() {} |
| 40 | 45 |
| 41 void InFlightBoundsChange::SetRevertValueFrom(const InFlightChange& change) { | 46 void InFlightBoundsChange::SetRevertValueFrom(const InFlightChange& change) { |
| 42 revert_bounds_ = | 47 revert_bounds_ = |
| 43 static_cast<const InFlightBoundsChange&>(change).revert_bounds_; | 48 static_cast<const InFlightBoundsChange&>(change).revert_bounds_; |
| 49 revert_local_surface_id_ = |
| 50 static_cast<const InFlightBoundsChange&>(change).revert_local_surface_id_; |
| 44 } | 51 } |
| 45 | 52 |
| 46 void InFlightBoundsChange::Revert() { | 53 void InFlightBoundsChange::Revert() { |
| 47 window_tree_client_->SetWindowBoundsFromServer(window(), revert_bounds_); | 54 window_tree_client_->SetWindowBoundsFromServer(window(), revert_bounds_, |
| 55 revert_local_surface_id_); |
| 48 } | 56 } |
| 49 | 57 |
| 50 // InFlightDragChange ----------------------------------------------------- | 58 // InFlightDragChange ----------------------------------------------------- |
| 51 | 59 |
| 52 InFlightDragChange::InFlightDragChange(WindowMus* window, ChangeType type) | 60 InFlightDragChange::InFlightDragChange(WindowMus* window, ChangeType type) |
| 53 : InFlightChange(window, type) { | 61 : InFlightChange(window, type) { |
| 54 DCHECK(type == ChangeType::MOVE_LOOP || type == ChangeType::DRAG_LOOP); | 62 DCHECK(type == ChangeType::MOVE_LOOP || type == ChangeType::DRAG_LOOP); |
| 55 } | 63 } |
| 56 | 64 |
| 57 void InFlightDragChange::SetRevertValueFrom(const InFlightChange& change) {} | 65 void InFlightDragChange::SetRevertValueFrom(const InFlightChange& change) {} |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 const InFlightChange& change) { | 254 const InFlightChange& change) { |
| 247 revert_modal_type_ = | 255 revert_modal_type_ = |
| 248 static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_; | 256 static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_; |
| 249 } | 257 } |
| 250 | 258 |
| 251 void InFlightSetModalTypeChange::Revert() { | 259 void InFlightSetModalTypeChange::Revert() { |
| 252 window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_); | 260 window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_); |
| 253 } | 261 } |
| 254 | 262 |
| 255 } // namespace aura | 263 } // namespace aura |
| OLD | NEW |