| 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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 | 1293 |
| 1294 window->SetPredefinedCursorFromServer(cursor); | 1294 window->SetPredefinedCursorFromServer(cursor); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 void WindowTreeClient::OnWindowSurfaceChanged( | 1297 void WindowTreeClient::OnWindowSurfaceChanged( |
| 1298 Id window_id, | 1298 Id window_id, |
| 1299 const cc::SurfaceInfo& surface_info) { | 1299 const cc::SurfaceInfo& surface_info) { |
| 1300 WindowMus* window = GetWindowByServerId(window_id); | 1300 WindowMus* window = GetWindowByServerId(window_id); |
| 1301 if (!window) | 1301 if (!window) |
| 1302 return; | 1302 return; |
| 1303 window->SetPrimarySurfaceInfo(surface_info); | 1303 if (enable_surface_synchronization_) { |
| 1304 // If surface synchronization is enabled, and the parent is informed |
| 1305 // of a child's surface then that surface ID is guaranteed to be available |
| 1306 // in the display compositor so we set it as the fallback. |
| 1307 window->SetFallbackSurfaceInfo(surface_info); |
| 1308 } else { |
| 1309 // If surface synchronization is disabled, fallback SurfaceInfos are never |
| 1310 // used. |
| 1311 window->SetPrimarySurfaceInfo(surface_info); |
| 1312 } |
| 1304 } | 1313 } |
| 1305 | 1314 |
| 1306 void WindowTreeClient::OnDragDropStart( | 1315 void WindowTreeClient::OnDragDropStart( |
| 1307 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { | 1316 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { |
| 1308 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data)); | 1317 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data)); |
| 1309 } | 1318 } |
| 1310 | 1319 |
| 1311 void WindowTreeClient::OnDragEnter(Id window_id, | 1320 void WindowTreeClient::OnDragEnter(Id window_id, |
| 1312 uint32_t key_state, | 1321 uint32_t key_state, |
| 1313 const gfx::Point& position, | 1322 const gfx::Point& position, |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1957 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1949 this, capture_synchronizer_.get(), window)); | 1958 this, capture_synchronizer_.get(), window)); |
| 1950 } | 1959 } |
| 1951 | 1960 |
| 1952 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1961 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
| 1953 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1962 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
| 1954 this, focus_synchronizer_.get(), window)); | 1963 this, focus_synchronizer_.get(), window)); |
| 1955 } | 1964 } |
| 1956 | 1965 |
| 1957 } // namespace aura | 1966 } // namespace aura |
| OLD | NEW |