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
3 // found in the LICENSE file.
5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_FACTORY_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_FACTORY_H_
8 #include "media/base/media_export.h"
9 #include "media/base/renderer_factory.h"
10 #include "media/mojo/interfaces/renderer.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h"
15 namespace interfaces
{
19 // The default factory class for creating MojoRendererImpl.
20 class MEDIA_EXPORT MojoRendererFactory
: public RendererFactory
{
22 explicit MojoRendererFactory(interfaces::ServiceFactory
* service_factory
);
23 ~MojoRendererFactory() final
;
25 scoped_ptr
<Renderer
> CreateRenderer(
26 const scoped_refptr
<base::SingleThreadTaskRunner
>& media_task_runner
,
27 const scoped_refptr
<base::TaskRunner
>& worker_task_runner
,
28 AudioRendererSink
* audio_renderer_sink
,
29 VideoRendererSink
* video_renderer_sink
) final
;
32 interfaces::ServiceFactory
* service_factory_
;
34 DISALLOW_COPY_AND_ASSIGN(MojoRendererFactory
);
39 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_FACTORY_H_