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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 } | 1294 } |
1295 | 1295 |
1296 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display, | 1296 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display, |
1297 ui::mojom::WindowDataPtr root_data, | 1297 ui::mojom::WindowDataPtr root_data, |
1298 bool parent_drawn) { | 1298 bool parent_drawn) { |
1299 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn); | 1299 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn); |
1300 } | 1300 } |
1301 | 1301 |
1302 void WindowTreeClient::WmDisplayRemoved(int64_t display_id) { | 1302 void WindowTreeClient::WmDisplayRemoved(int64_t display_id) { |
1303 DCHECK(window_manager_delegate_); | 1303 DCHECK(window_manager_delegate_); |
1304 // TODO: route to WindowTreeHost. | 1304 for (WindowMus* root : roots_) { |
1305 /* | 1305 DCHECK(root->GetWindow()->GetHost()); |
1306 for (Window* root : roots_) { | 1306 WindowTreeHostMus* window_tree_host = |
1307 if (root->display_id() == display_id) { | 1307 static_cast<WindowTreeHostMus*>(root->GetWindow()->GetHost()); |
1308 window_manager_delegate_->OnWmDisplayRemoved(root); | 1308 if (window_tree_host->display_id() == display_id) { |
| 1309 window_manager_delegate_->OnWmDisplayRemoved(window_tree_host); |
1309 return; | 1310 return; |
1310 } | 1311 } |
1311 } | 1312 } |
1312 */ | |
1313 } | 1313 } |
1314 | 1314 |
1315 void WindowTreeClient::WmDisplayModified(const display::Display& display) { | 1315 void WindowTreeClient::WmDisplayModified(const display::Display& display) { |
1316 DCHECK(window_manager_delegate_); | 1316 DCHECK(window_manager_delegate_); |
1317 // TODO(sky): this should likely route to WindowTreeHost. | 1317 // TODO(sky): this should likely route to WindowTreeHost. |
1318 window_manager_delegate_->OnWmDisplayModified(display); | 1318 window_manager_delegate_->OnWmDisplayModified(display); |
1319 } | 1319 } |
1320 | 1320 |
1321 // TODO(riajiang): Convert between pixel and DIP for window bounds properly. | 1321 // TODO(riajiang): Convert between pixel and DIP for window bounds properly. |
1322 // (http://crbug.com/646942) | 1322 // (http://crbug.com/646942) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1583 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1584 this, capture_synchronizer_.get(), window)); | 1584 this, capture_synchronizer_.get(), window)); |
1585 } | 1585 } |
1586 | 1586 |
1587 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1587 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1588 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1588 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1589 this, focus_synchronizer_.get(), window)); | 1589 this, focus_synchronizer_.get(), window)); |
1590 } | 1590 } |
1591 | 1591 |
1592 } // namespace aura | 1592 } // namespace aura |
OLD | NEW |