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

Unified Diff: ui/aura/mus/in_flight_change.cc

Issue 2710023007: Make WindowTree::SetModal() take the type. (Closed)
Patch Set: address feedback. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_port_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/in_flight_change.cc
diff --git a/ui/aura/mus/in_flight_change.cc b/ui/aura/mus/in_flight_change.cc
index 3b369a5455de92448725dd894aa1e13afb833818..b96299c8409a0190e5bcc245fd45c6cd69a6df2f 100644
--- a/ui/aura/mus/in_flight_change.cc
+++ b/ui/aura/mus/in_flight_change.cc
@@ -231,18 +231,25 @@ void InFlightOpacityChange::Revert() {
window()->SetOpacityFromServer(revert_opacity_);
}
-// InFlightSetModalChange ------------------------------------------------------
+// InFlightSetModalTypeChange
+// ------------------------------------------------------
-InFlightSetModalChange::InFlightSetModalChange(WindowMus* window)
- : InFlightChange(window, ChangeType::SET_MODAL) {}
+InFlightSetModalTypeChange::InFlightSetModalTypeChange(
+ WindowMus* window,
+ ui::ModalType revert_value)
+ : InFlightChange(window, ChangeType::SET_MODAL),
+ revert_modal_type_(revert_value) {}
-InFlightSetModalChange::~InFlightSetModalChange() {}
+InFlightSetModalTypeChange::~InFlightSetModalTypeChange() {}
-void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {}
+void InFlightSetModalTypeChange::SetRevertValueFrom(
+ const InFlightChange& change) {
+ revert_modal_type_ =
+ static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_;
+}
-void InFlightSetModalChange::Revert() {
- // TODO: need to support more than just off. http://crbug.com/660073.
- window()->GetWindow()->SetProperty(client::kModalKey, ui::MODAL_TYPE_NONE);
+void InFlightSetModalTypeChange::Revert() {
+ window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_);
}
} // namespace aura
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_port_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698