Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: ui/aura/mus/in_flight_change.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: First cut propagating LocalSurfaceId when WindowTreeHost requests resize Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698