| 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, | 1399 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, |
| 1400 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 1400 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 1401 ServerWindow* window = | 1401 ServerWindow* window = |
| 1402 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1402 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1403 const bool success = | 1403 const bool success = |
| 1404 window && access_policy_->CanSetWindowCompositorFrameSink(window, type); | 1404 window && access_policy_->CanSetWindowCompositorFrameSink(window, type); |
| 1405 if (!success) { | 1405 if (!success) { |
| 1406 DVLOG(1) << "request to AttachCompositorFrameSink failed"; | 1406 DVLOG(1) << "request to AttachCompositorFrameSink failed"; |
| 1407 return; | 1407 return; |
| 1408 } | 1408 } |
| 1409 window->CreateCompositorFrameSink(type, gfx::kNullAcceleratedWidget, | 1409 window->CreateOffscreenCompositorFrameSink( |
| 1410 std::move(compositor_frame_sink), | 1410 type, std::move(compositor_frame_sink), std::move(client)); |
| 1411 std::move(client)); | |
| 1412 } | 1411 } |
| 1413 | 1412 |
| 1414 void WindowTree::SetWindowTextInputState(Id transport_window_id, | 1413 void WindowTree::SetWindowTextInputState(Id transport_window_id, |
| 1415 mojo::TextInputStatePtr state) { | 1414 mojo::TextInputStatePtr state) { |
| 1416 ServerWindow* window = | 1415 ServerWindow* window = |
| 1417 GetWindowByClientId(ClientWindowId(transport_window_id)); | 1416 GetWindowByClientId(ClientWindowId(transport_window_id)); |
| 1418 bool success = window && access_policy_->CanSetWindowTextInputState(window); | 1417 bool success = window && access_policy_->CanSetWindowTextInputState(window); |
| 1419 if (success) | 1418 if (success) |
| 1420 window->SetTextInputState(state.To<ui::TextInputState>()); | 1419 window->SetTextInputState(state.To<ui::TextInputState>()); |
| 1421 } | 1420 } |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 1994 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 1996 effect_bitmask, callback); | 1995 effect_bitmask, callback); |
| 1997 } | 1996 } |
| 1998 | 1997 |
| 1999 void WindowTree::PerformOnDragDropDone() { | 1998 void WindowTree::PerformOnDragDropDone() { |
| 2000 client()->OnDragDropDone(); | 1999 client()->OnDragDropDone(); |
| 2001 } | 2000 } |
| 2002 | 2001 |
| 2003 } // namespace ws | 2002 } // namespace ws |
| 2004 } // namespace ui | 2003 } // namespace ui |
| OLD | NEW |