|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by Elliot Glaysher Modified:
3 years, 11 months ago CC:
chromium-reviews, rjkroege, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, darin (slow to review) Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionaura-mus: Make StackAtTop() proxy to the window manager.
sky convinced me that we can't just let the window server handle this;
reordering assumes that the caller is also the owner of parent, so the
window manager is the one who must make the reorder call.
BUG=663617
TEST=DesktopWindowTreeHostMusTest.Stack*
Review-Url: https://codereview.chromium.org/2652713003
Cr-Commit-Position: refs/heads/master@{#445864}
Committed: https://chromium.googlesource.com/chromium/src/+/180d76b0129bc5361b80d850d3b442d8dfebf401
Patch Set 1 #Patch Set 2 : Merge with tot #Patch Set 3 : Fix mus_ws_unittests compile. #Patch Set 4 : Fix grammar. #
Total comments: 2
Patch Set 5 : Add explicit bails in WmStackAtTop. #
Total comments: 1
Patch Set 6 : Assume aura::Window::StackAtTop succeeds. #Patch Set 7 : Add check to window_manager_delegate_ in WmStackAtTop. #
Messages
Total messages: 47 (32 generated)
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== aura-mus: Make StackAtTop() proxy to the window manager. sky convinced me that we can't just let the window server handle this; reordering assumes that the caller is also the owner of parent, so the window manager is the one who must make the reorder call. BUG=663617 ========== to ========== aura-mus: Make StackAtTop() proxy to the window manager. sky convinced me that we can't just let the window server handle this; reordering assumes that the caller is also the owner of parent, so the window manager is the one who must make the reorder call. BUG=663617 TEST=DesktopWindowTreeHostMusTest.Stack* ==========
erg@chromium.org changed reviewers: + sky@chromium.org
https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... ui/aura/mus/window_tree_client.cc:1522: void WindowTreeClient::WmStackAtTop(uint32_t wm_change_id, uint32_t window_id) { How does the window manager know to match up the wm_change_id here? Generally there is an explicit ack function for the wm_change_ids. See OnWmMoveLoopCompleted for what I mean. But looking at the implementation here, I'm not sure you really need the ack. Does it matter?
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... ui/aura/mus/window_tree_client.cc:1522: void WindowTreeClient::WmStackAtTop(uint32_t wm_change_id, uint32_t window_id) { On 2017/01/24 00:54:01, sky wrote: > How does the window manager know to match up the wm_change_id here? Generally > there is an explicit ack function for the wm_change_ids. The incoming wm_change_id gets responded to in WindowTreeClient::OnChangeCompleted(); we map the |change_id| for reordering the window to the |wm_change_id| in |in_flight_change_map_|. When the ReorderWindow change returns, we pass that change's return value back as wm_change_id's return value. (And you can verify this with the unit tests, which still pass, even though they're now waiting on the entire chain of client -> server -> window manager -> server -> client.) (If you're saying my error conditions below are dropping the response, I just fixed that.) > But looking at the implementation here, > I'm not sure you really need the ack. Does it matter? That's what I was asking you a few hours back. It does help those unit tests show that this entire sequence works, but I'm pretty sure that wasn't why--I don't remember why I was concerned about this or why I convinced you this was correct. (Or are you asking about why the ack needs to be forwarded back to the server?)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2017/01/24 01:16:06, Elliot Glaysher wrote: > https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... > File ui/aura/mus/window_tree_client.cc (right): > > https://codereview.chromium.org/2652713003/diff/50001/ui/aura/mus/window_tree... > ui/aura/mus/window_tree_client.cc:1522: void > WindowTreeClient::WmStackAtTop(uint32_t wm_change_id, uint32_t window_id) { > On 2017/01/24 00:54:01, sky wrote: > > How does the window manager know to match up the wm_change_id here? Generally > > there is an explicit ack function for the wm_change_ids. > > The incoming wm_change_id gets responded to in > WindowTreeClient::OnChangeCompleted(); we map the |change_id| for reordering the > window to the |wm_change_id| in |in_flight_change_map_|. When the ReorderWindow > change returns, we pass that change's return value back as wm_change_id's return > value. (And you can verify this with the unit tests, which still pass, even > though they're now waiting on the entire chain of client -> server -> window > manager -> server -> client.) > > (If you're saying my error conditions below are dropping the response, I just > fixed that.) > > > But looking at the implementation here, > > I'm not sure you really need the ack. Does it matter? > > That's what I was asking you a few hours back. It does help those unit tests > show that this entire sequence works, but I'm pretty sure that wasn't why--I > don't remember why I was concerned about this or why I convinced you this was > correct. > > (Or are you asking about why the ack needs to be forwarded back to the server?) The general flow for messages originating from a client that are forwarded to the window manager is: 1. client supplies it's own message_id. 2. window-server identifies message as being routed to window-manager. Calls WindowServer::GenerateWindowManagerChangeId() to generate change id specifically for window-manager. 3. window-manager does whatever it wants, then calls back with WmResponse and the change id it was supplied. 4. window-server matches ids and calls back to originating client with the original message_id and response. You have parts of this. I don't see part 4.
https://codereview.chromium.org/2652713003/diff/70001/ui/aura/mus/window_tree... File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2652713003/diff/70001/ui/aura/mus/window_tree... ui/aura/mus/window_tree_client.cc:1523: WindowMus* window = GetWindowByServerId(window_id); I think you want almost the same logic here as is in OnWindowMusMoveChild. In fact if you call StackAtTop from this implementation I think it'll generate everything you need. The only additional call you need id the WmResponse call.
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
ptal this calls Window::StackChildAtTop() in WmStackAtTop and assumes it succeeds, as discussed in person.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM
The CQ bit was checked by erg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
erg@chromium.org changed reviewers: + tsepez@chromium.org
+tseepez for mojom review.
On 2017/01/24 22:28:24, Elliot Glaysher wrote: > +tseepez for mojom review. This is browser to WM or other privileged process to WM?
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
On 2017/01/24 22:31:15, Tom Sepez wrote: > On 2017/01/24 22:28:24, Elliot Glaysher wrote: > > +tseepez for mojom review. > > This is browser to WM or other privileged process to WM? This is window server to window manager.
The CQ bit was checked by erg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
OK, we can trust the IDs then so LGTM.
The CQ bit was unchecked by erg@chromium.org
The CQ bit was checked by erg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sky@chromium.org Link to the patchset: https://codereview.chromium.org/2652713003/#ps110001 (title: "Add check to window_manager_delegate_ in WmStackAtTop.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 110001, "attempt_start_ts": 1485298214472220,
"parent_rev": "19c538ff5147d06a199e190f55c3873541e78d06", "commit_rev":
"180d76b0129bc5361b80d850d3b442d8dfebf401"}
Message was sent while issue was closed.
Description was changed from ========== aura-mus: Make StackAtTop() proxy to the window manager. sky convinced me that we can't just let the window server handle this; reordering assumes that the caller is also the owner of parent, so the window manager is the one who must make the reorder call. BUG=663617 TEST=DesktopWindowTreeHostMusTest.Stack* ========== to ========== aura-mus: Make StackAtTop() proxy to the window manager. sky convinced me that we can't just let the window server handle this; reordering assumes that the caller is also the owner of parent, so the window manager is the one who must make the reorder call. BUG=663617 TEST=DesktopWindowTreeHostMusTest.Stack* Review-Url: https://codereview.chromium.org/2652713003 Cr-Commit-Position: refs/heads/master@{#445864} Committed: https://chromium.googlesource.com/chromium/src/+/180d76b0129bc5361b80d850d3b4... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:110001) as https://chromium.googlesource.com/chromium/src/+/180d76b0129bc5361b80d850d3b4... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
