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

Issue 2604453002: Fix WindowTreeClient::RequestClose(window_id). (Closed)

Created:
4 years ago by riajiang
Modified:
3 years, 11 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, kalyank
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix WindowTreeClient::RequestClose(window_id). In the new client-lib, non-root windows can also be closed using WindowTreeClient::RequestClose. If the window is the root window, we send close request to the entire WindowTreeHost. Otherwise we ask the delegate of the window to close it. We are not adding a delegate to the root window because functions like Window::GetToplevelWindow() would fail. BUG=676091 TEST=aura_unittests Committed: https://crrev.com/655b0a08086da3328bee25e73070fcd30f7e5e9e Cr-Commit-Position: refs/heads/master@{#441557}

Patch Set 1 #

Patch Set 2 : test #

Patch Set 3 : test #

Total comments: 1

Patch Set 4 : remove non-root case #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M ui/aura/mus/window_tree_client.cc View 1 2 3 1 chunk +3 lines, -1 line 1 comment Download
M ui/aura/mus/window_tree_client_unittest.cc View 1 2 3 2 chunks +37 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (13 generated)
riajiang
Hi sadrul@, PTAL, thanks!
3 years, 11 months ago (2017-01-03 20:12:10 UTC) #4
sadrul
+sky@ for his thoughts. lgtm https://codereview.chromium.org/2604453002/diff/60001/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2604453002/diff/60001/ui/aura/mus/window_tree_client.cc#newcode1323 ui/aura/mus/window_tree_client.cc:1323: } Don't need {} ...
3 years, 11 months ago (2017-01-04 20:08:07 UTC) #6
sky
On 2017/01/04 20:08:07, sadrul wrote: > +sky@ for his thoughts. > > lgtm > > ...
3 years, 11 months ago (2017-01-04 21:00:57 UTC) #7
riajiang
On 2017/01/04 21:00:57, sky wrote: > On 2017/01/04 20:08:07, sadrul wrote: > > +sky@ for ...
3 years, 11 months ago (2017-01-04 22:00:23 UTC) #8
sky
Ok, thanks for the explanation. One question. How come you are allowing IsRoot to be ...
3 years, 11 months ago (2017-01-04 22:13:36 UTC) #9
riajiang
On 2017/01/04 22:13:36, sky wrote: > Ok, thanks for the explanation. One question. How come ...
3 years, 11 months ago (2017-01-04 22:37:15 UTC) #10
sky
WmRequestClose is only applicable to roots, so you shouldn't need to remove the check early ...
3 years, 11 months ago (2017-01-04 22:50:50 UTC) #11
riajiang
On 2017/01/04 22:50:50, sky wrote: > WmRequestClose is only applicable to roots, so you shouldn't ...
3 years, 11 months ago (2017-01-05 00:49:07 UTC) #12
sky
LGTM
3 years, 11 months ago (2017-01-05 00:51:16 UTC) #15
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/2604453002/80001
3 years, 11 months ago (2017-01-05 02:04:54 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:80001)
3 years, 11 months ago (2017-01-05 02:08:51 UTC) #23
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/655b0a08086da3328bee25e73070fcd30f7e5e9e Cr-Commit-Position: refs/heads/master@{#441557}
3 years, 11 months ago (2017-01-05 02:10:51 UTC) #25
sadrul
3 years, 11 months ago (2017-01-05 02:49:00 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2604453002/diff/80001/ui/aura/mus/window_tree...
File ui/aura/mus/window_tree_client.cc (left):

https://codereview.chromium.org/2604453002/diff/80001/ui/aura/mus/window_tree...
ui/aura/mus/window_tree_client.cc:1317:
window->GetWindow()->delegate()->OnRequestClose();
I think WindowDelegate::OnRequestClose() can now be removed, since this was the
only place that called it?

Powered by Google App Engine
This is Rietveld 408576698