| 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, | 1416 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, |
| 1417 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 1417 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 1418 ServerWindow* window = | 1418 ServerWindow* window = |
| 1419 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1419 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1420 const bool success = | 1420 const bool success = |
| 1421 window && access_policy_->CanSetWindowCompositorFrameSink(window); | 1421 window && access_policy_->CanSetWindowCompositorFrameSink(window); |
| 1422 if (!success) { | 1422 if (!success) { |
| 1423 DVLOG(1) << "request to AttachCompositorFrameSink failed"; | 1423 DVLOG(1) << "request to AttachCompositorFrameSink failed"; |
| 1424 return; | 1424 return; |
| 1425 } | 1425 } |
| 1426 window->CreateOffscreenCompositorFrameSink(std::move(compositor_frame_sink), | 1426 window->CreateCompositorFrameSink(std::move(compositor_frame_sink), |
| 1427 std::move(client)); | 1427 std::move(client)); |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 void WindowTree::SetWindowTextInputState(Id transport_window_id, | 1430 void WindowTree::SetWindowTextInputState(Id transport_window_id, |
| 1431 mojo::TextInputStatePtr state) { | 1431 mojo::TextInputStatePtr state) { |
| 1432 ServerWindow* window = | 1432 ServerWindow* window = |
| 1433 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1433 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1434 bool success = window && access_policy_->CanSetWindowTextInputState(window); | 1434 bool success = window && access_policy_->CanSetWindowTextInputState(window); |
| 1435 if (success) | 1435 if (success) |
| 1436 window->SetTextInputState(state.To<ui::TextInputState>()); | 1436 window->SetTextInputState(state.To<ui::TextInputState>()); |
| 1437 } | 1437 } |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2156 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 2157 effect_bitmask, callback); | 2157 effect_bitmask, callback); |
| 2158 } | 2158 } |
| 2159 | 2159 |
| 2160 void WindowTree::PerformOnDragDropDone() { | 2160 void WindowTree::PerformOnDragDropDone() { |
| 2161 client()->OnDragDropDone(); | 2161 client()->OnDragDropDone(); |
| 2162 } | 2162 } |
| 2163 | 2163 |
| 2164 } // namespace ws | 2164 } // namespace ws |
| 2165 } // namespace ui | 2165 } // namespace ui |
| OLD | NEW |