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

Unified Diff: services/ui/public/cpp/window_tree_client.cc

Issue 2548513002: Update bool WindowManager::OnWmSetBounds() to match with its desirable behavior. (Closed)
Patch Set: change bool to void. Created 4 years 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
Index: services/ui/public/cpp/window_tree_client.cc
diff --git a/services/ui/public/cpp/window_tree_client.cc b/services/ui/public/cpp/window_tree_client.cc
index 868e17f7d08b1fb7ecf10d474b53ca8290afa709..edb51ce6c1d6d0f2ac05e7858310c528ea1834a6 100644
--- a/services/ui/public/cpp/window_tree_client.cc
+++ b/services/ui/public/cpp/window_tree_client.cc
@@ -42,11 +42,6 @@ Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) {
// Helper function to get the device_scale_factor() of the display::Display
// with |display_id|.
float ScaleFactorForDisplay(int64_t display_id) {
- // TODO(jonross): Remove this once aura-mus is complete. Currently the screen
- // is not being set properly for mus-in-renderer. (http://crbug.com/659155)
- if (!display::Screen::GetScreen())
- return 1.f;
-
// TODO(riajiang): Change to use display::GetDisplayWithDisplayId() after
// https://codereview.chromium.org/2361283002/ is landed.
std::vector<display::Display> displays =
@@ -1321,14 +1316,8 @@ void WindowTreeClient::WmSetBounds(uint32_t change_id,
DCHECK(window_manager_delegate_);
gfx::Rect transit_bounds_in_dip = gfx::ConvertRectToDIP(
ScaleFactorForDisplay(window->display_id()), transit_bounds);
- gfx::Rect bounds = transit_bounds_in_dip;
- result = window_manager_delegate_->OnWmSetBounds(window, &bounds);
- if (result) {
- // If the resulting bounds differ return false. Returning false ensures
- // the client applies the bounds we set below.
- result = bounds == transit_bounds_in_dip;
- window->SetBounds(bounds);
- }
+ window_manager_delegate_->OnWmSetBounds(window, &transit_bounds_in_dip);
Fady Samuel 2016/12/02 23:18:25 Add window->SetBounds(transit_bounds_in_dip)?
thanhph 2016/12/05 17:54:00 Done.
+ result = true;
}
if (window_manager_internal_client_)
window_manager_internal_client_->WmResponse(change_id, result);

Powered by Google App Engine
This is Rietveld 408576698