OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1307 window_manager_internal_.reset( | 1307 window_manager_internal_.reset( |
1308 new mojo::AssociatedBinding<ui::mojom::WindowManager>( | 1308 new mojo::AssociatedBinding<ui::mojom::WindowManager>( |
1309 this, std::move(internal))); | 1309 this, std::move(internal))); |
1310 } | 1310 } |
1311 | 1311 |
1312 void WindowTreeClient::RequestClose(uint32_t window_id) { | 1312 void WindowTreeClient::RequestClose(uint32_t window_id) { |
1313 WindowMus* window = GetWindowByServerId(window_id); | 1313 WindowMus* window = GetWindowByServerId(window_id); |
1314 if (!window || !IsRoot(window)) | 1314 if (!window || !IsRoot(window)) |
1315 return; | 1315 return; |
1316 | 1316 |
1317 window->GetWindow()->delegate()->OnRequestClose(); | 1317 // Since the window is the root window, we send close request to the entire |
sadrul
2017/01/05 02:49:00
I think WindowDelegate::OnRequestClose() can now b
| |
1318 // WindowTreeHost. | |
1319 GetWindowTreeHostMus(window->GetWindow())->OnCloseRequest(); | |
1318 } | 1320 } |
1319 | 1321 |
1320 void WindowTreeClient::OnConnect(ClientSpecificId client_id) { | 1322 void WindowTreeClient::OnConnect(ClientSpecificId client_id) { |
1321 client_id_ = client_id; | 1323 client_id_ = client_id; |
1322 } | 1324 } |
1323 | 1325 |
1324 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display, | 1326 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display, |
1325 ui::mojom::WindowDataPtr root_data, | 1327 ui::mojom::WindowDataPtr root_data, |
1326 bool parent_drawn) { | 1328 bool parent_drawn) { |
1327 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn); | 1329 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn); |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1692 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1694 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1693 this, capture_synchronizer_.get(), window)); | 1695 this, capture_synchronizer_.get(), window)); |
1694 } | 1696 } |
1695 | 1697 |
1696 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1698 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1697 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1699 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1698 this, focus_synchronizer_.get(), window)); | 1700 this, focus_synchronizer_.get(), window)); |
1699 } | 1701 } |
1700 | 1702 |
1701 } // namespace aura | 1703 } // namespace aura |
OLD | NEW |