WindowTreeClient should allow clients to delete it when they want, the way we have things now leads to weird shutdown ordering.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9636beeb7afa6167b07e6afe2b463d920ebe61bc commit 9636beeb7afa6167b07e6afe2b463d920ebe61bc Author: sky <sky@chromium.org> Date: Tue Sep 06 18:09:32 2016 Changes ownership of WindowTreeClient Previously WindowTreeClient had two types of ownership. It would some times delete itself, but clients could also delete it. This is confusing and leads to problems. This patch makes it so that WindowTreeClient is always owned by whoever created it and never deletes itself. The only wrinkle is what to do when WindowTreeClient loses its connection to mus. I made it so the delegate is told this happens, but the internal state is not changed in anyway. I went with this in so far as it lets the consumer of WindowTreeClient take whatever action is appropriate. To do otherwise can often conflict with what the client wants to do. This does mean the client can continue creating windows and other things, but effectively nothing is happening on the mus side (it's gone). BUG= 642182 TEST=none R=sadrul@chromium.org TBR=ben@chromium.org Review-Url: https://codereview.chromium.org/2301353003 Cr-Commit-Position: refs/heads/master@{#416670} [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/test/wm_test_helper.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/window_manager.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/window_manager.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/window_manager_application.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/window_manager_application.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ash/mus/window_manager_unittest.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/content/renderer/mus/compositor_mus_connection.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/content/renderer/mus/compositor_mus_connection.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/navigation/view_impl.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/navigation/view_impl.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/demo/mus_demo.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/demo/mus_demo.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/tests/test_window_tree_client_setup.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/tests/test_window_tree_client_setup.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/tests/window_server_test_base.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/tests/window_server_test_base.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/tests/window_tree_client_unittest.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/window_tree_client.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/window_tree_client.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/window_tree_client_delegate.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/window_tree_host_factory.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/public/cpp/window_tree_host_factory.h [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/test_wm/test_wm.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/services/ui/ws/window_manager_client_unittest.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ui/views/mus/window_manager_connection.cc [modify] https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc/ui/views/mus/window_manager_connection.h
Comment 1 by sky@chromium.org
, Sep 2 2016Status: Started (was: Untriaged)