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/ws/window_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 client()->OnChangeCompleted(change_id, success); | 1338 client()->OnChangeCompleted(change_id, success); |
1339 } | 1339 } |
1340 | 1340 |
1341 void WindowTree::SetWindowOpacity(uint32_t change_id, | 1341 void WindowTree::SetWindowOpacity(uint32_t change_id, |
1342 Id window_id, | 1342 Id window_id, |
1343 float opacity) { | 1343 float opacity) { |
1344 client()->OnChangeCompleted( | 1344 client()->OnChangeCompleted( |
1345 change_id, SetWindowOpacity(ClientWindowId(window_id), opacity)); | 1345 change_id, SetWindowOpacity(ClientWindowId(window_id), opacity)); |
1346 } | 1346 } |
1347 | 1347 |
1348 void WindowTree::AttachSurface(Id transport_window_id, | 1348 void WindowTree::AttachSurface( |
1349 mojom::SurfaceType type, | 1349 Id transport_window_id, |
1350 mojo::InterfaceRequest<mojom::Surface> surface, | 1350 mojom::SurfaceType type, |
1351 mojom::SurfaceClientPtr client) { | 1351 mojo::InterfaceRequest<cc::mojom::MojoCompositorFrameSink> surface, |
| 1352 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
1352 ServerWindow* window = | 1353 ServerWindow* window = |
1353 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1354 GetWindowByClientId(ClientWindowId(transport_window_id)); |
1354 const bool success = | 1355 const bool success = |
1355 window && access_policy_->CanSetWindowSurface(window, type); | 1356 window && access_policy_->CanSetWindowSurface(window, type); |
1356 if (!success) { | 1357 if (!success) { |
1357 DVLOG(1) << "request to AttachSurface failed"; | 1358 DVLOG(1) << "request to AttachSurface failed"; |
1358 return; | 1359 return; |
1359 } | 1360 } |
1360 window->CreateSurface(type, std::move(surface), std::move(client)); | 1361 window->CreateSurface(type, std::move(surface), std::move(client)); |
1361 } | 1362 } |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 1937 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
1937 effect_bitmask, callback); | 1938 effect_bitmask, callback); |
1938 } | 1939 } |
1939 | 1940 |
1940 void WindowTree::PerformOnDragDropDone() { | 1941 void WindowTree::PerformOnDragDropDone() { |
1941 client()->OnDragDropDone(); | 1942 client()->OnDragDropDone(); |
1942 } | 1943 } |
1943 | 1944 |
1944 } // namespace ws | 1945 } // namespace ws |
1945 } // namespace ui | 1946 } // namespace ui |
OLD | NEW |