| 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/window_mus.h" | 9 #include "ui/aura/mus/window_mus.h" |
| 9 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
| 10 #include "ui/aura/mus/window_tree_client.h" | 11 #include "ui/aura/mus/window_tree_client.h" |
| 11 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 12 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
| 13 | 14 |
| 14 namespace aura { | 15 namespace aura { |
| 15 | 16 |
| 16 // InFlightChange ------------------------------------------------------------- | 17 // InFlightChange ------------------------------------------------------------- |
| 17 | 18 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 106 } |
| 106 | 107 |
| 107 void InFlightWindowTreeClientChange::OnWindowDestroyed(Window* window) { | 108 void InFlightWindowTreeClientChange::OnWindowDestroyed(Window* window) { |
| 108 // NOTE: this has to be in OnWindowDestroyed() as FocusClients typically | 109 // NOTE: this has to be in OnWindowDestroyed() as FocusClients typically |
| 109 // change focus in OnWindowDestroying(). | 110 // change focus in OnWindowDestroying(). |
| 110 SetRevertWindow(nullptr); | 111 SetRevertWindow(nullptr); |
| 111 } | 112 } |
| 112 | 113 |
| 113 // InFlightCaptureChange ------------------------------------------------------ | 114 // InFlightCaptureChange ------------------------------------------------------ |
| 114 | 115 |
| 115 InFlightCaptureChange::InFlightCaptureChange(WindowTreeClient* client, | 116 InFlightCaptureChange::InFlightCaptureChange( |
| 116 WindowMus* revert_value) | 117 WindowTreeClient* client, |
| 117 : InFlightWindowTreeClientChange(client, | 118 CaptureSynchronizer* capture_synchronizer, |
| 118 revert_value, | 119 WindowMus* revert_value) |
| 119 ChangeType::CAPTURE) {} | 120 : InFlightWindowTreeClientChange(client, revert_value, ChangeType::CAPTURE), |
| 121 capture_synchronizer_(capture_synchronizer) {} |
| 120 | 122 |
| 121 InFlightCaptureChange::~InFlightCaptureChange() {} | 123 InFlightCaptureChange::~InFlightCaptureChange() {} |
| 122 | 124 |
| 123 void InFlightCaptureChange::Revert() { | 125 void InFlightCaptureChange::Revert() { |
| 124 client()->SetCaptureFromServer(revert_window()); | 126 capture_synchronizer_->SetCaptureFromServer(revert_window()); |
| 125 } | 127 } |
| 126 | 128 |
| 127 // InFlightFocusChange -------------------------------------------------------- | 129 // InFlightFocusChange -------------------------------------------------------- |
| 128 | 130 |
| 129 InFlightFocusChange::InFlightFocusChange(WindowTreeClient* client, | 131 InFlightFocusChange::InFlightFocusChange(WindowTreeClient* client, |
| 130 WindowMus* revert_value) | 132 WindowMus* revert_value) |
| 131 : InFlightWindowTreeClientChange(client, revert_value, ChangeType::FOCUS) {} | 133 : InFlightWindowTreeClientChange(client, revert_value, ChangeType::FOCUS) {} |
| 132 | 134 |
| 133 InFlightFocusChange::~InFlightFocusChange() {} | 135 InFlightFocusChange::~InFlightFocusChange() {} |
| 134 | 136 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 InFlightSetModalChange::~InFlightSetModalChange() {} | 236 InFlightSetModalChange::~InFlightSetModalChange() {} |
| 235 | 237 |
| 236 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {} | 238 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {} |
| 237 | 239 |
| 238 void InFlightSetModalChange::Revert() { | 240 void InFlightSetModalChange::Revert() { |
| 239 // TODO: need to support more than just off. http://crbug.com/660073. | 241 // TODO: need to support more than just off. http://crbug.com/660073. |
| 240 window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE); | 242 window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE); |
| 241 } | 243 } |
| 242 | 244 |
| 243 } // namespace aura | 245 } // namespace aura |
| OLD | NEW |