Chromium Code Reviews| Index: ui/aura/mus/window_tree_client.cc |
| diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc |
| index e9d1c0772d7a3ed3e42a9dae278a8516cec18268..0335352ed9e8e0e5c27d48669c2aa0a05f2d6a9b 100644 |
| --- a/ui/aura/mus/window_tree_client.cc |
| +++ b/ui/aura/mus/window_tree_client.cc |
| @@ -1311,10 +1311,16 @@ void WindowTreeClient::GetWindowManager( |
| void WindowTreeClient::RequestClose(uint32_t window_id) { |
| WindowMus* window = GetWindowByServerId(window_id); |
| - if (!window || !IsRoot(window)) |
| + if (!window) |
| return; |
| - window->GetWindow()->delegate()->OnRequestClose(); |
| + // 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. |
| + if (IsRoot(window)) { |
| + GetWindowTreeHostMus(window->GetWindow())->OnCloseRequest(); |
| + } else { |
| + window->GetWindow()->delegate()->OnRequestClose(); |
| + } |
|
sadrul
2017/01/04 20:08:07
Don't need {}
As discussed offline, the alternate
|
| } |
| void WindowTreeClient::OnConnect(ClientSpecificId client_id) { |