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

Unified Diff: components/mus/public/cpp/lib/in_flight_change.cc

Issue 1811913004: mus: Allow SetModal to fail gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed constructor/destructor Created 4 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 | « components/mus/public/cpp/lib/in_flight_change.h ('k') | components/mus/public/cpp/lib/window_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/in_flight_change.cc
diff --git a/components/mus/public/cpp/lib/in_flight_change.cc b/components/mus/public/cpp/lib/in_flight_change.cc
index 6b01224047340c015b5c8fda69fec3285802d309..714efc9948faf14c162db993883337e2bf294bc7 100644
--- a/components/mus/public/cpp/lib/in_flight_change.cc
+++ b/components/mus/public/cpp/lib/in_flight_change.cc
@@ -177,6 +177,8 @@ InFlightVisibleChange::InFlightVisibleChange(Window* window,
: InFlightChange(window, ChangeType::VISIBLE),
revert_visible_(revert_value) {}
+InFlightVisibleChange::~InFlightVisibleChange() {}
+
void InFlightVisibleChange::SetRevertValueFrom(const InFlightChange& change) {
revert_visible_ =
static_cast<const InFlightVisibleChange&>(change).revert_visible_;
@@ -186,4 +188,17 @@ void InFlightVisibleChange::Revert() {
WindowPrivate(window()).LocalSetVisible(revert_visible_);
}
+// InFlightSetModalChange ------------------------------------------------------
+
+InFlightSetModalChange::InFlightSetModalChange(Window* window)
+ : InFlightChange(window, ChangeType::SET_MODAL) {}
+
+InFlightSetModalChange::~InFlightSetModalChange() {}
+
+void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {}
+
+void InFlightSetModalChange::Revert() {
+ WindowPrivate(window()).LocalUnsetModal();
+}
+
} // namespace mus
« no previous file with comments | « components/mus/public/cpp/lib/in_flight_change.h ('k') | components/mus/public/cpp/lib/window_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698