| 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 "services/ui/public/cpp/window_tree_client.h" | 5 #include "services/ui/public/cpp/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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 | 1133 |
| 1134 InFlightPredefinedCursorChange new_change(window, cursor); | 1134 InFlightPredefinedCursorChange new_change(window, cursor); |
| 1135 if (ApplyServerChangeToExistingInFlightChange(new_change)) | 1135 if (ApplyServerChangeToExistingInFlightChange(new_change)) |
| 1136 return; | 1136 return; |
| 1137 | 1137 |
| 1138 WindowPrivate(window).LocalSetPredefinedCursor(cursor); | 1138 WindowPrivate(window).LocalSetPredefinedCursor(cursor); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 void WindowTreeClient::OnWindowSurfaceChanged( | 1141 void WindowTreeClient::OnWindowSurfaceChanged( |
| 1142 Id window_id, | 1142 Id window_id, |
| 1143 const cc::SurfaceId& surface_id, | 1143 const cc::SurfaceInfo& surface_info) { |
| 1144 const gfx::Size& frame_size, | |
| 1145 float device_scale_factor) { | |
| 1146 Window* window = GetWindowByServerId(window_id); | 1144 Window* window = GetWindowByServerId(window_id); |
| 1147 if (!window) | 1145 if (!window) |
| 1148 return; | 1146 return; |
| 1149 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>()); | 1147 WindowPrivate(window).LocalSetSurfaceInfo(surface_info); |
| 1150 surface_info->surface_id = surface_id; | |
| 1151 surface_info->frame_size = frame_size; | |
| 1152 surface_info->device_scale_factor = device_scale_factor; | |
| 1153 WindowPrivate(window).LocalSetSurfaceId(std::move(surface_info)); | |
| 1154 } | 1148 } |
| 1155 | 1149 |
| 1156 void WindowTreeClient::OnDragDropStart( | 1150 void WindowTreeClient::OnDragDropStart( |
| 1157 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { | 1151 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { |
| 1158 mime_drag_data_ = mojo::UnorderedMapToMap(mime_data); | 1152 mime_drag_data_ = mojo::UnorderedMapToMap(mime_data); |
| 1159 } | 1153 } |
| 1160 | 1154 |
| 1161 void WindowTreeClient::OnDragEnter(Id window_id, | 1155 void WindowTreeClient::OnDragEnter(Id window_id, |
| 1162 uint32_t key_state, | 1156 uint32_t key_state, |
| 1163 const gfx::Point& position, | 1157 const gfx::Point& position, |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 // TODO(riajiang): Figure out if |offset| needs to be converted. | 1471 // TODO(riajiang): Figure out if |offset| needs to be converted. |
| 1478 // (http://crbugs.com/646932) | 1472 // (http://crbugs.com/646932) |
| 1479 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1473 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1480 server_id(window), offset.x(), offset.y(), | 1474 server_id(window), offset.x(), offset.y(), |
| 1481 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), | 1475 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), |
| 1482 hit_area)); | 1476 hit_area)); |
| 1483 } | 1477 } |
| 1484 } | 1478 } |
| 1485 | 1479 |
| 1486 } // namespace ui | 1480 } // namespace ui |
| OLD | NEW |