| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 } | 739 } |
| 740 } | 740 } |
| 741 const uint32_t change_id = | 741 const uint32_t change_id = |
| 742 ScheduleInFlightChange(base::MakeUnique<InFlightPropertyChange>( | 742 ScheduleInFlightChange(base::MakeUnique<InFlightPropertyChange>( |
| 743 window, transport_name, std::move(data_mus->transport_value))); | 743 window, transport_name, std::move(data_mus->transport_value))); |
| 744 tree_->SetWindowProperty(change_id, window->server_id(), | 744 tree_->SetWindowProperty(change_id, window->server_id(), |
| 745 mojo::String(transport_name), | 745 mojo::String(transport_name), |
| 746 std::move(transport_value_mojo)); | 746 std::move(transport_value_mojo)); |
| 747 } | 747 } |
| 748 | 748 |
| 749 void WindowTreeClient::OnWindowMusSurfaceDetached( | |
| 750 WindowMus* window, | |
| 751 const cc::SurfaceSequence& sequence) { | |
| 752 tree_->OnWindowSurfaceDetached(window->server_id(), sequence); | |
| 753 } | |
| 754 | |
| 755 void WindowTreeClient::OnWmMoveLoopCompleted(uint32_t change_id, | 749 void WindowTreeClient::OnWmMoveLoopCompleted(uint32_t change_id, |
| 756 bool completed) { | 750 bool completed) { |
| 757 if (window_manager_internal_client_) | 751 if (window_manager_internal_client_) |
| 758 window_manager_internal_client_->WmResponse(change_id, completed); | 752 window_manager_internal_client_->WmResponse(change_id, completed); |
| 759 | 753 |
| 760 if (change_id == current_wm_move_loop_change_) { | 754 if (change_id == current_wm_move_loop_change_) { |
| 761 current_wm_move_loop_change_ = 0; | 755 current_wm_move_loop_change_ = 0; |
| 762 current_wm_move_loop_window_id_ = 0; | 756 current_wm_move_loop_window_id_ = 0; |
| 763 } | 757 } |
| 764 } | 758 } |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 InFlightPredefinedCursorChange new_change(window, cursor); | 1194 InFlightPredefinedCursorChange new_change(window, cursor); |
| 1201 if (ApplyServerChangeToExistingInFlightChange(new_change)) | 1195 if (ApplyServerChangeToExistingInFlightChange(new_change)) |
| 1202 return; | 1196 return; |
| 1203 | 1197 |
| 1204 window->SetPredefinedCursorFromServer(cursor); | 1198 window->SetPredefinedCursorFromServer(cursor); |
| 1205 } | 1199 } |
| 1206 | 1200 |
| 1207 void WindowTreeClient::OnWindowSurfaceChanged( | 1201 void WindowTreeClient::OnWindowSurfaceChanged( |
| 1208 Id window_id, | 1202 Id window_id, |
| 1209 const cc::SurfaceId& surface_id, | 1203 const cc::SurfaceId& surface_id, |
| 1210 const cc::SurfaceSequence& surface_sequence, | |
| 1211 const gfx::Size& frame_size, | 1204 const gfx::Size& frame_size, |
| 1212 float device_scale_factor) { | 1205 float device_scale_factor) { |
| 1213 WindowMus* window = GetWindowByServerId(window_id); | 1206 WindowMus* window = GetWindowByServerId(window_id); |
| 1214 if (!window) | 1207 if (!window) |
| 1215 return; | 1208 return; |
| 1216 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>()); | 1209 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>()); |
| 1217 surface_info->surface_id = surface_id; | 1210 surface_info->surface_id = surface_id; |
| 1218 surface_info->surface_sequence = surface_sequence; | |
| 1219 surface_info->frame_size = frame_size; | 1211 surface_info->frame_size = frame_size; |
| 1220 surface_info->device_scale_factor = device_scale_factor; | 1212 surface_info->device_scale_factor = device_scale_factor; |
| 1221 window->SetSurfaceIdFromServer(std::move(surface_info)); | 1213 window->SetSurfaceIdFromServer(std::move(surface_info)); |
| 1222 } | 1214 } |
| 1223 | 1215 |
| 1224 void WindowTreeClient::OnDragDropStart( | 1216 void WindowTreeClient::OnDragDropStart( |
| 1225 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) { | 1217 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) { |
| 1226 drag_drop_controller_->OnDragDropStart( | 1218 drag_drop_controller_->OnDragDropStart( |
| 1227 mime_data.To<std::map<std::string, std::vector<uint8_t>>>()); | 1219 mime_data.To<std::map<std::string, std::vector<uint8_t>>>()); |
| 1228 } | 1220 } |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 return ScheduleInFlightChange( | 1574 return ScheduleInFlightChange( |
| 1583 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); | 1575 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); |
| 1584 } | 1576 } |
| 1585 | 1577 |
| 1586 uint32_t WindowTreeClient::CreateChangeIdForCapture(WindowMus* window) { | 1578 uint32_t WindowTreeClient::CreateChangeIdForCapture(WindowMus* window) { |
| 1587 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1579 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1588 this, capture_synchronizer_.get(), window)); | 1580 this, capture_synchronizer_.get(), window)); |
| 1589 } | 1581 } |
| 1590 | 1582 |
| 1591 } // namespace aura | 1583 } // namespace aura |
| OLD | NEW |