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