| 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" | |
| 10 #include "ui/aura/mus/window_mus.h" | 9 #include "ui/aura/mus/window_mus.h" |
| 11 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
| 12 #include "ui/aura/mus/window_tree_client.h" | 11 #include "ui/aura/mus/window_tree_client.h" |
| 13 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 14 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
| 15 | 14 |
| 16 namespace aura { | 15 namespace aura { |
| 17 | 16 |
| 18 // InFlightChange ------------------------------------------------------------- | 17 // InFlightChange ------------------------------------------------------------- |
| 19 | 18 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 122 |
| 124 InFlightCaptureChange::~InFlightCaptureChange() {} | 123 InFlightCaptureChange::~InFlightCaptureChange() {} |
| 125 | 124 |
| 126 void InFlightCaptureChange::Revert() { | 125 void InFlightCaptureChange::Revert() { |
| 127 capture_synchronizer_->SetCaptureFromServer(revert_window()); | 126 capture_synchronizer_->SetCaptureFromServer(revert_window()); |
| 128 } | 127 } |
| 129 | 128 |
| 130 // InFlightFocusChange -------------------------------------------------------- | 129 // InFlightFocusChange -------------------------------------------------------- |
| 131 | 130 |
| 132 InFlightFocusChange::InFlightFocusChange(WindowTreeClient* client, | 131 InFlightFocusChange::InFlightFocusChange(WindowTreeClient* client, |
| 133 FocusSynchronizer* focus_synchronizer, | |
| 134 WindowMus* revert_value) | 132 WindowMus* revert_value) |
| 135 : InFlightWindowTreeClientChange(client, revert_value, ChangeType::FOCUS), | 133 : InFlightWindowTreeClientChange(client, revert_value, ChangeType::FOCUS) {} |
| 136 focus_synchronizer_(focus_synchronizer) {} | |
| 137 | 134 |
| 138 InFlightFocusChange::~InFlightFocusChange() {} | 135 InFlightFocusChange::~InFlightFocusChange() {} |
| 139 | 136 |
| 140 void InFlightFocusChange::Revert() { | 137 void InFlightFocusChange::Revert() { |
| 141 focus_synchronizer_->SetFocusFromServer(revert_window()); | 138 client()->SetFocusFromServer(revert_window()); |
| 142 } | 139 } |
| 143 | 140 |
| 144 // InFlightPropertyChange ----------------------------------------------------- | 141 // InFlightPropertyChange ----------------------------------------------------- |
| 145 | 142 |
| 146 InFlightPropertyChange::InFlightPropertyChange( | 143 InFlightPropertyChange::InFlightPropertyChange( |
| 147 WindowMus* window, | 144 WindowMus* window, |
| 148 const std::string& property_name, | 145 const std::string& property_name, |
| 149 std::unique_ptr<std::vector<uint8_t>> revert_value) | 146 std::unique_ptr<std::vector<uint8_t>> revert_value) |
| 150 : InFlightChange(window, ChangeType::PROPERTY), | 147 : InFlightChange(window, ChangeType::PROPERTY), |
| 151 property_name_(property_name), | 148 property_name_(property_name), |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 InFlightSetModalChange::~InFlightSetModalChange() {} | 236 InFlightSetModalChange::~InFlightSetModalChange() {} |
| 240 | 237 |
| 241 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {} | 238 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {} |
| 242 | 239 |
| 243 void InFlightSetModalChange::Revert() { | 240 void InFlightSetModalChange::Revert() { |
| 244 // 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. |
| 245 window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE); | 242 window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE); |
| 246 } | 243 } |
| 247 | 244 |
| 248 } // namespace aura | 245 } // namespace aura |
| OLD | NEW |