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

Unified Diff: ui/aura/mus/window_tree_client.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/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 934261571eae24565c6abb99a6eb7cb4782885f0..987ddcdb95435bc262aa918cccbdb38efb512fca 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -483,22 +483,16 @@ void WindowTreeClient::OnConnectionLost() {
}
bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window,
- const void* key) {
+ const void* key,
+ int64_t old_value) {
if (key != client::kModalKey)
return false;
- if (window->GetWindow()->GetProperty(client::kModalKey) ==
- ui::MODAL_TYPE_NONE) {
- // TODO: shouldn't early return, but explicitly tell server to turn off
- // modality. http://crbug.com/660073.
- return true;
- }
-
const uint32_t change_id =
- ScheduleInFlightChange(base::MakeUnique<InFlightSetModalChange>(window));
- // TODO: this is subtly different that explicitly specifying a type.
- // http://crbug.com/660073.
- tree_->SetModal(change_id, window->server_id());
+ ScheduleInFlightChange(base::MakeUnique<InFlightSetModalTypeChange>(
+ window, static_cast<ui::ModalType>(old_value)));
+ tree_->SetModalType(change_id, window->server_id(),
+ window->GetWindow()->GetProperty(client::kModalKey));
return true;
}
@@ -737,8 +731,9 @@ WindowTreeClient::OnWindowMusWillChangeProperty(WindowMus* window,
void WindowTreeClient::OnWindowMusPropertyChanged(
WindowMus* window,
const void* key,
+ int64_t old_value,
std::unique_ptr<ui::PropertyData> data) {
- if (HandleInternalPropertyChanged(window, key) || !data)
+ if (HandleInternalPropertyChanged(window, key, old_value) || !data)
return;
WindowPortPropertyDataMus* data_mus =
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698