This sets up API to release OutputSurface from LTHClient.
[chromium-blink-merge.git] / media / mojo / services / mojo_renderer_factory.h
blob64b68382fd615aac2245589e73cb4c92cab537dc
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"
13 namespace media {
15 namespace interfaces {
16 class ServiceFactory;
19 // The default factory class for creating MojoRendererImpl.
20 class MEDIA_EXPORT MojoRendererFactory : public RendererFactory {
21 public:
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;
31 private:
32 interfaces::ServiceFactory* service_factory_;
34 DISALLOW_COPY_AND_ASSIGN(MojoRendererFactory);
37 } // namespace media
39 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_FACTORY_H_