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

Issue 2778823002: Simplify WindowManager::OnWmSetBounds (Closed)

Created:
3 years, 8 months ago by Fady Samuel
Modified:
3 years, 8 months ago
Reviewers:
Tom Sepez, sadrul, sky
CC:
chromium-reviews, rjkroege, kalyank, sadrul
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify WindowManager::OnWmSetBounds If a top level window requests a change in bounds, that request will get plumbed into the window manager. At that point, the window manager can veto the bounds change. This change simplifies the control flow about by having the window manager always responding "no" (false) to the client while also setting the window bounds itself based on the request. By giving a response of false to the client, it will revert the currently pending InFlightBoundsChange. If the bounds change initiated by the window manager arrives first to the client, then the inflight change's revert will be updated, and when the negative response arrives, it's a noop. BUG=672151 Review-Url: https://codereview.chromium.org/2778823002 Cr-Commit-Position: refs/heads/master@{#459928} Committed: https://chromium.googlesource.com/chromium/src/+/69875b5a5f926383fe0e2d476bf6c42c30b8b741

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updated comment to reflect reality #

Patch Set 3 : Fix Mus Demo Build #

Patch Set 4 : Addressed Scott's comment #

Total comments: 1

Patch Set 5 : More cleanup #

Total comments: 2

Patch Set 6 : Add comment in WmSetBoundsResponse #

Patch Set 7 : Update expectations for DragTestInteractive.DragTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -49 lines) Patch
M ash/mus/window_manager.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ash/mus/window_manager.cc View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M mash/simple_wm/simple_wm.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M mash/simple_wm/simple_wm.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M services/ui/demo/mus_demo_internal.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/demo/mus_demo_internal.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M services/ui/public/interfaces/window_manager.mojom View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/test_wm/test_wm.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M services/ui/ws/window_manager_client_unittest.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M services/ui/ws/window_server_test_base.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/window_server_test_base.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M services/ui/ws/window_tree.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/ws/window_tree.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M ui/aura/mus/window_manager_delegate.h View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M ui/aura/mus/window_tree_client.cc View 1 2 3 4 1 chunk +3 lines, -12 lines 0 comments Download
M ui/aura/test/aura_test_base.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/test/aura_test_base.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M ui/views/mus/drag_interactive_uitest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 40 (26 generated)
Fady Samuel
Hi Scott, Is this along the lines of what you were expecting. This seems to ...
3 years, 8 months ago (2017-03-27 16:45:33 UTC) #3
sadrul
https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc#newcode1417 ui/aura/mus/window_tree_client.cc:1417: window_manager_internal_client_->WmResponse(change_id, result); Maybe the WM does not need to ...
3 years, 8 months ago (2017-03-27 17:06:17 UTC) #9
Fady Samuel
https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc#newcode1417 ui/aura/mus/window_tree_client.cc:1417: window_manager_internal_client_->WmResponse(change_id, result); On 2017/03/27 17:06:16, sadrul wrote: > Maybe ...
3 years, 8 months ago (2017-03-27 17:11:42 UTC) #10
sky
https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc#newcode1417 ui/aura/mus/window_tree_client.cc:1417: window_manager_internal_client_->WmResponse(change_id, result); On 2017/03/27 17:11:42, Fady Samuel wrote: > ...
3 years, 8 months ago (2017-03-27 17:14:57 UTC) #11
Fady Samuel
PTAL Scott! https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2778823002/diff/1/ui/aura/mus/window_tree_client.cc#newcode1417 ui/aura/mus/window_tree_client.cc:1417: window_manager_internal_client_->WmResponse(change_id, result); On 2017/03/27 17:14:56, sky wrote: ...
3 years, 8 months ago (2017-03-27 18:15:36 UTC) #14
Fady Samuel
Will do a bit more cleanup. https://codereview.chromium.org/2778823002/diff/60001/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2778823002/diff/60001/ui/aura/mus/window_tree_client.cc#newcode1411 ui/aura/mus/window_tree_client.cc:1411: &bounds_in_dip); Actually, this ...
3 years, 8 months ago (2017-03-27 18:16:37 UTC) #17
Fady Samuel
Passing bounds as const ref to OnWmSetBounds now. PTAL!
3 years, 8 months ago (2017-03-27 18:26:32 UTC) #20
sky
LGTM https://codereview.chromium.org/2778823002/diff/80001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2778823002/diff/80001/services/ui/ws/window_tree.cc#newcode2074 services/ui/ws/window_tree.cc:2074: WmResponse(change_id, false); Document why false is used.
3 years, 8 months ago (2017-03-27 19:22:51 UTC) #23
Fady Samuel
CQ'ing https://codereview.chromium.org/2778823002/diff/80001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2778823002/diff/80001/services/ui/ws/window_tree.cc#newcode2074 services/ui/ws/window_tree.cc:2074: WmResponse(change_id, false); On 2017/03/27 19:22:51, sky wrote: > ...
3 years, 8 months ago (2017-03-27 20:31:11 UTC) #24
Fady Samuel
+tsepez@ for mojom
3 years, 8 months ago (2017-03-27 20:31:28 UTC) #26
Tom Sepez
lgtm
3 years, 8 months ago (2017-03-27 20:34:27 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778823002/100001
3 years, 8 months ago (2017-03-27 21:31:50 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778823002/50015
3 years, 8 months ago (2017-03-27 22:15:15 UTC) #37
commit-bot: I haz the power
3 years, 8 months ago (2017-03-27 23:17:09 UTC) #40
Message was sent while issue was closed.
Committed patchset #7 (id:50015) as
https://chromium.googlesource.com/chromium/src/+/69875b5a5f926383fe0e2d476bf6...

Powered by Google App Engine
This is Rietveld 408576698