| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDER_WIDGET_COMPOSITOR_FRAME_SINK_PROVIDER_H_ |
| 6 #define CONTENT_BROWSER_RENDER_WIDGET_COMPOSITOR_FRAME_SINK_PROVIDER_H_ |
| 7 |
| 8 #include "content/common/frame_sink_provider.mojom.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // This class lives in the browser and provides MojoCompositorFrameSink for the |
| 14 // renderer. To access this class in the renderer, call: |
| 15 // RenderThreadImpl::current()->GetFrameSinkProvider(). |
| 16 class FrameSinkProviderImpl : public mojom::FrameSinkProvider { |
| 17 public: |
| 18 explicit FrameSinkProviderImpl(int32_t process_id); |
| 19 ~FrameSinkProviderImpl() override; |
| 20 |
| 21 void Bind(mojom::FrameSinkProviderRequest request); |
| 22 void Unbind(); |
| 23 |
| 24 // mojom::FrameSinkProvider implementation. |
| 25 void CreateForWidget( |
| 26 int32_t widget_id, |
| 27 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 28 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; |
| 29 |
| 30 private: |
| 31 const int32_t process_id_; |
| 32 mojo::Binding<mojom::FrameSinkProvider> binding_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(FrameSinkProviderImpl); |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_BROWSER_RENDER_WIDGET_COMPOSITOR_FRAME_SINK_PROVIDER_H_ |
| OLD | NEW |