OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "content/renderer/mus/renderer_window_tree_client.h" | 5 #include "content/renderer/mus/renderer_window_tree_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "services/ui/public/cpp/window_compositor_frame_sink.h" | 10 #include "services/ui/public/cpp/client_compositor_frame_sink.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 namespace { | 14 namespace { |
15 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap; | 15 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap; |
16 base::LazyInstance<ConnectionMap>::Leaky g_connections = | 16 base::LazyInstance<ConnectionMap>::Leaky g_connections = |
17 LAZY_INSTANCE_INITIALIZER; | 17 LAZY_INSTANCE_INITIALIZER; |
18 } // namespace | 18 } // namespace |
19 | 19 |
20 // static | 20 // static |
(...skipping 30 matching lines...) Expand all Loading... |
51 void RendererWindowTreeClient::Bind( | 51 void RendererWindowTreeClient::Bind( |
52 ui::mojom::WindowTreeClientRequest request) { | 52 ui::mojom::WindowTreeClientRequest request) { |
53 binding_.Bind(std::move(request)); | 53 binding_.Bind(std::move(request)); |
54 } | 54 } |
55 | 55 |
56 std::unique_ptr<cc::CompositorFrameSink> | 56 std::unique_ptr<cc::CompositorFrameSink> |
57 RendererWindowTreeClient::CreateCompositorFrameSink( | 57 RendererWindowTreeClient::CreateCompositorFrameSink( |
58 const cc::FrameSinkId& frame_sink_id, | 58 const cc::FrameSinkId& frame_sink_id, |
59 scoped_refptr<cc::ContextProvider> context_provider, | 59 scoped_refptr<cc::ContextProvider> context_provider, |
60 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { | 60 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
61 std::unique_ptr<ui::WindowCompositorFrameSinkBinding> frame_sink_binding; | 61 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> frame_sink_binding; |
62 auto frame_sink = ui::WindowCompositorFrameSink::Create( | 62 auto frame_sink = ui::ClientCompositorFrameSink::Create( |
63 frame_sink_id, std::move(context_provider), gpu_memory_buffer_manager, | 63 frame_sink_id, std::move(context_provider), gpu_memory_buffer_manager, |
64 &frame_sink_binding); | 64 &frame_sink_binding); |
65 if (tree_) { | 65 if (tree_) { |
66 tree_->AttachCompositorFrameSink( | 66 tree_->AttachCompositorFrameSink( |
67 root_window_id_, frame_sink_binding->TakeFrameSinkRequest(), | 67 root_window_id_, frame_sink_binding->TakeFrameSinkRequest(), |
68 mojo::MakeProxy(frame_sink_binding->TakeFrameSinkClient())); | 68 mojo::MakeProxy(frame_sink_binding->TakeFrameSinkClient())); |
69 } else { | 69 } else { |
70 pending_frame_sink_ = std::move(frame_sink_binding); | 70 pending_frame_sink_ = std::move(frame_sink_binding); |
71 } | 71 } |
72 return std::move(frame_sink); | 72 return std::move(frame_sink); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 bool success) {} | 227 bool success) {} |
228 | 228 |
229 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {} | 229 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {} |
230 | 230 |
231 void RendererWindowTreeClient::GetWindowManager( | 231 void RendererWindowTreeClient::GetWindowManager( |
232 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) { | 232 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) { |
233 NOTREACHED(); | 233 NOTREACHED(); |
234 } | 234 } |
235 | 235 |
236 } // namespace content | 236 } // namespace content |
OLD | NEW |