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

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

Issue 2778823002: Simplify WindowManager::OnWmSetBounds (Closed)
Patch Set: Update expectations for DragTestInteractive.DragTest 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_manager_delegate.h ('k') | ui/aura/test/aura_test_base.h » ('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 da326eaacc31fbbd72b5c6e81e84700cfdfc116c..f82367c0fd8938906cf24dc3c2bbbc2f8d61e446 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1401,27 +1401,18 @@ void WindowTreeClient::WmSetBounds(uint32_t change_id,
Id window_id,
const gfx::Rect& transit_bounds_in_pixels) {
WindowMus* window = GetWindowByServerId(window_id);
- bool result = false;
if (window) {
float device_scale_factor = ScaleFactorForDisplay(window->GetWindow());
DCHECK(window_manager_delegate_);
gfx::Rect transit_bounds_in_dip =
gfx::ConvertRectToDIP(device_scale_factor, transit_bounds_in_pixels);
- gfx::Rect bounds_in_dip = transit_bounds_in_dip;
- // TODO: this needs to trigger scheduling a bounds change on |window|.
- result = window_manager_delegate_->OnWmSetBounds(window->GetWindow(),
- &bounds_in_dip);
- if (result) {
- // If the resulting bounds differ return false. Returning false ensures
- // the client applies the bounds we set below.
- result = bounds_in_dip == transit_bounds_in_dip;
- window->SetBoundsFromServer(bounds_in_dip);
- }
+ window_manager_delegate_->OnWmSetBounds(window->GetWindow(),
+ transit_bounds_in_dip);
} else {
DVLOG(1) << "Unknown window passed to WmSetBounds().";
}
if (window_manager_internal_client_)
- window_manager_internal_client_->WmResponse(change_id, result);
+ window_manager_internal_client_->WmSetBoundsResponse(change_id);
}
void WindowTreeClient::WmSetProperty(
« no previous file with comments | « ui/aura/mus/window_manager_delegate.h ('k') | ui/aura/test/aura_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698