OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" | 5 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "cc/surfaces/frame_sink_id.h" | 8 #include "cc/surfaces/frame_sink_id.h" |
8 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" | 9 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" |
9 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 // static | 14 // static |
14 void OffscreenCanvasSurfaceFactoryImpl::Create( | 15 void OffscreenCanvasSurfaceFactoryImpl::Create( |
15 blink::mojom::OffscreenCanvasSurfaceFactoryRequest request) { | 16 blink::mojom::OffscreenCanvasSurfaceFactoryRequest request) { |
16 mojo::MakeStrongBinding(base::MakeUnique<OffscreenCanvasSurfaceFactoryImpl>(), | 17 mojo::MakeStrongBinding(base::MakeUnique<OffscreenCanvasSurfaceFactoryImpl>(), |
17 std::move(request)); | 18 std::move(request)); |
18 } | 19 } |
19 | 20 |
20 void OffscreenCanvasSurfaceFactoryImpl::CreateOffscreenCanvasSurface( | 21 void OffscreenCanvasSurfaceFactoryImpl::CreateOffscreenCanvasSurface( |
21 const cc::FrameSinkId& frame_sink_id, | 22 const cc::FrameSinkId& frame_sink_id, |
22 blink::mojom::OffscreenCanvasSurfaceClientPtr client, | 23 blink::mojom::OffscreenCanvasSurfaceClientPtr client, |
23 blink::mojom::OffscreenCanvasSurfaceRequest request) { | 24 blink::mojom::OffscreenCanvasSurfaceRequest request) { |
24 OffscreenCanvasSurfaceImpl::Create(frame_sink_id, std::move(client), | 25 OffscreenCanvasSurfaceImpl::Create(frame_sink_id, std::move(client), |
25 std::move(request)); | 26 std::move(request)); |
26 } | 27 } |
27 | 28 |
28 } // namespace content | 29 } // namespace content |
OLD | NEW |