| 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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, | 1363 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, |
| 1364 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 1364 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 1365 ServerWindow* window = | 1365 ServerWindow* window = |
| 1366 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1366 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1367 const bool success = | 1367 const bool success = |
| 1368 window && access_policy_->CanSetWindowCompositorFrameSink(window, type); | 1368 window && access_policy_->CanSetWindowCompositorFrameSink(window, type); |
| 1369 if (!success) { | 1369 if (!success) { |
| 1370 DVLOG(1) << "request to AttachCompositorFrameSink failed"; | 1370 DVLOG(1) << "request to AttachCompositorFrameSink failed"; |
| 1371 return; | 1371 return; |
| 1372 } | 1372 } |
| 1373 window->CreateCompositorFrameSink(type, gfx::kNullAcceleratedWidget, nullptr, | 1373 window->CreateCompositorFrameSink(type, gfx::kNullAcceleratedWidget, |
| 1374 nullptr, std::move(compositor_frame_sink), | 1374 std::move(compositor_frame_sink), |
| 1375 std::move(client)); | 1375 std::move(client)); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 void WindowTree::SetWindowTextInputState(Id transport_window_id, | 1378 void WindowTree::SetWindowTextInputState(Id transport_window_id, |
| 1379 mojo::TextInputStatePtr state) { | 1379 mojo::TextInputStatePtr state) { |
| 1380 ServerWindow* window = | 1380 ServerWindow* window = |
| 1381 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1381 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1382 bool success = window && access_policy_->CanSetWindowTextInputState(window); | 1382 bool success = window && access_policy_->CanSetWindowTextInputState(window); |
| 1383 if (success) | 1383 if (success) |
| 1384 window->SetTextInputState(state.To<ui::TextInputState>()); | 1384 window->SetTextInputState(state.To<ui::TextInputState>()); |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 1943 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 1944 effect_bitmask, callback); | 1944 effect_bitmask, callback); |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 void WindowTree::PerformOnDragDropDone() { | 1947 void WindowTree::PerformOnDragDropDone() { |
| 1948 client()->OnDragDropDone(); | 1948 client()->OnDragDropDone(); |
| 1949 } | 1949 } |
| 1950 | 1950 |
| 1951 } // namespace ws | 1951 } // namespace ws |
| 1952 } // namespace ui | 1952 } // namespace ui |
| OLD | NEW |