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

Side by Side 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 unified diff | Download patch
OLDNEW
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 "components/mus/public/cpp/lib/in_flight_change.h" 5 #include "components/mus/public/cpp/lib/in_flight_change.h"
6 6
7 #include "components/mus/public/cpp/lib/window_private.h" 7 #include "components/mus/public/cpp/lib/window_private.h"
8 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" 8 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
9 #include "components/mus/public/cpp/window_tree_connection.h" 9 #include "components/mus/public/cpp/window_tree_connection.h"
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 WindowPrivate(window()).LocalSetPredefinedCursor(revert_cursor_); 170 WindowPrivate(window()).LocalSetPredefinedCursor(revert_cursor_);
171 } 171 }
172 172
173 // InFlightVisibleChange ------------------------------------------------------- 173 // InFlightVisibleChange -------------------------------------------------------
174 174
175 InFlightVisibleChange::InFlightVisibleChange(Window* window, 175 InFlightVisibleChange::InFlightVisibleChange(Window* window,
176 bool revert_value) 176 bool revert_value)
177 : InFlightChange(window, ChangeType::VISIBLE), 177 : InFlightChange(window, ChangeType::VISIBLE),
178 revert_visible_(revert_value) {} 178 revert_visible_(revert_value) {}
179 179
180 InFlightVisibleChange::~InFlightVisibleChange() {}
181
180 void InFlightVisibleChange::SetRevertValueFrom(const InFlightChange& change) { 182 void InFlightVisibleChange::SetRevertValueFrom(const InFlightChange& change) {
181 revert_visible_ = 183 revert_visible_ =
182 static_cast<const InFlightVisibleChange&>(change).revert_visible_; 184 static_cast<const InFlightVisibleChange&>(change).revert_visible_;
183 } 185 }
184 186
185 void InFlightVisibleChange::Revert() { 187 void InFlightVisibleChange::Revert() {
186 WindowPrivate(window()).LocalSetVisible(revert_visible_); 188 WindowPrivate(window()).LocalSetVisible(revert_visible_);
187 } 189 }
188 190
191 // InFlightSetModalChange ------------------------------------------------------
192
193 InFlightSetModalChange::InFlightSetModalChange(Window* window)
194 : InFlightChange(window, ChangeType::SET_MODAL) {}
195
196 InFlightSetModalChange::~InFlightSetModalChange() {}
197
198 void InFlightSetModalChange::SetRevertValueFrom(const InFlightChange& change) {}
199
200 void InFlightSetModalChange::Revert() {
201 WindowPrivate(window()).LocalUnsetModal();
202 }
203
189 } // namespace mus 204 } // namespace mus
OLDNEW
« 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