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

Issue 2301353003: Changes ownership of WindowTreeClient (Closed)

Created:
4 years, 3 months ago by sky
Modified:
4 years, 3 months ago
CC:
chromium-reviews, rjkroege, mlamouri+watch-content_chromium.org, sadrul, tfarina, jam, darin-cc_chromium.org, kalyank
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc Cr-Commit-Position: refs/heads/master@{#416670}

Patch Set 1 #

Total comments: 10

Patch Set 2 : cleanup #

Patch Set 3 : merge and fix mus_demo #

Patch Set 4 : feedback #

Patch Set 5 : merge #

Patch Set 6 : fix navigation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+283 lines, -222 lines) Patch
M ash/mus/test/wm_test_helper.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M ash/mus/window_manager.h View 3 chunks +9 lines, -4 lines 0 comments Download
M ash/mus/window_manager.cc View 1 3 chunks +40 lines, -24 lines 0 comments Download
M ash/mus/window_manager_application.h View 1 chunk +2 lines, -1 line 0 comments Download
M ash/mus/window_manager_application.cc View 1 3 chunks +6 lines, -5 lines 0 comments Download
M ash/mus/window_manager_unittest.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/mus/compositor_mus_connection.h View 1 3 chunks +11 lines, -1 line 0 comments Download
M content/renderer/mus/compositor_mus_connection.cc View 4 chunks +24 lines, -3 lines 0 comments Download
M services/navigation/view_impl.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M services/navigation/view_impl.cc View 1 2 3 4 5 3 chunks +11 lines, -2 lines 0 comments Download
M services/ui/demo/mus_demo.h View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M services/ui/demo/mus_demo.cc View 1 2 5 chunks +13 lines, -8 lines 0 comments Download
M services/ui/public/cpp/tests/test_window_tree_client_setup.h View 1 4 chunks +5 lines, -9 lines 0 comments Download
M services/ui/public/cpp/tests/test_window_tree_client_setup.cc View 1 2 3 3 chunks +7 lines, -14 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.h View 1 6 chunks +12 lines, -5 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.cc View 5 chunks +30 lines, -8 lines 0 comments Download
M services/ui/public/cpp/tests/window_tree_client_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/public/cpp/window_tree_client.h View 1 3 chunks +10 lines, -18 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.cc View 7 chunks +11 lines, -24 lines 0 comments Download
M services/ui/public/cpp/window_tree_client_delegate.h View 1 1 chunk +14 lines, -7 lines 0 comments Download
M services/ui/public/cpp/window_tree_host_factory.h View 1 2 3 1 chunk +11 lines, -8 lines 0 comments Download
M services/ui/public/cpp/window_tree_host_factory.cc View 1 chunk +17 lines, -11 lines 0 comments Download
M services/ui/test_wm/test_wm.cc View 1 4 chunks +11 lines, -6 lines 0 comments Download
M services/ui/ws/window_manager_client_unittest.cc View 7 chunks +11 lines, -48 lines 0 comments Download
M ui/views/mus/window_manager_connection.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/mus/window_manager_connection.cc View 1 chunk +9 lines, -6 lines 0 comments Download

Messages

Total messages: 27 (19 generated)
sky
jam: content sadrul: all
4 years, 3 months ago (2016-09-02 15:52:47 UTC) #3
sadrul
Cool! lgtm (sorry, my comments are in patchset 1. It looks like you have addressed ...
4 years, 3 months ago (2016-09-02 17:04:16 UTC) #8
jam
lgtm
4 years, 3 months ago (2016-09-03 03:30:21 UTC) #13
sky
+ben for services/navigation https://codereview.chromium.org/2301353003/diff/1/services/ui/public/cpp/tests/test_window_tree_client_setup.cc File services/ui/public/cpp/tests/test_window_tree_client_setup.cc (right): https://codereview.chromium.org/2301353003/diff/1/services/ui/public/cpp/tests/test_window_tree_client_setup.cc#newcode36 services/ui/public/cpp/tests/test_window_tree_client_setup.cc:36: return std::move(window_tree_client_); On 2016/09/02 17:04:15, sadrul ...
4 years, 3 months ago (2016-09-06 17:15:42 UTC) #17
sky
TBR ben for services/navigation change
4 years, 3 months ago (2016-09-06 18:01:59 UTC) #19
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/2301353003/100001
4 years, 3 months ago (2016-09-06 18:03:01 UTC) #23
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-09-06 18:10:10 UTC) #25
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 18:14:28 UTC) #27
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9636beeb7afa6167b07e6afe2b463d920ebe61bc
Cr-Commit-Position: refs/heads/master@{#416670}

Powered by Google App Engine
This is Rietveld 408576698