| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 void InFlightOpacityChange::SetRevertValueFrom(const InFlightChange& change) { | 225 void InFlightOpacityChange::SetRevertValueFrom(const InFlightChange& change) { |
| 226 revert_opacity_ = | 226 revert_opacity_ = |
| 227 static_cast<const InFlightOpacityChange&>(change).revert_opacity_; | 227 static_cast<const InFlightOpacityChange&>(change).revert_opacity_; |
| 228 } | 228 } |
| 229 | 229 |
| 230 void InFlightOpacityChange::Revert() { | 230 void InFlightOpacityChange::Revert() { |
| 231 window()->SetOpacityFromServer(revert_opacity_); | 231 window()->SetOpacityFromServer(revert_opacity_); |
| 232 } | 232 } |
| 233 | 233 |
| 234 // InFlightSetModalChange ------------------------------------------------------ | 234 // InFlightSetModalTypeChange |
| 235 // ------------------------------------------------------ |
| 235 | 236 |
| 236 InFlightSetModalChange::InFlightSetModalChange(WindowMus* window) | 237 InFlightSetModalTypeChange::InFlightSetModalTypeChange( |
| 237 : InFlightChange(window, ChangeType::SET_MODAL) {} | 238 WindowMus* window, |
| 239 ui::ModalType revert_value) |
| 240 : InFlightChange(window, ChangeType::SET_MODAL), |
| 241 revert_modal_type_(revert_value) {} |
| 238 | 242 |
| 239 InFlightSetModalChange::~InFlightSetModalChange() {} | 243 InFlightSetModalTypeChange::~InFlightSetModalTypeChange() {} |
| 240 | 244 |
| 241 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {} | 245 void InFlightSetModalTypeChange::SetRevertValueFrom( |
| 246 const InFlightChange& change) { |
| 247 revert_modal_type_ = |
| 248 static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_; |
| 249 } |
| 242 | 250 |
| 243 void InFlightSetModalChange::Revert() { | 251 void InFlightSetModalTypeChange::Revert() { |
| 244 // TODO: need to support more than just off. http://crbug.com/660073. | 252 window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_); |
| 245 window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE); | |
| 246 } | 253 } |
| 247 | 254 |
| 248 } // namespace aura | 255 } // namespace aura |
| OLD | NEW |