Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1253)

Unified Diff: media/mojo/services/mojo_renderer_factory.h

Issue 795193003: Introduce MojoRendererFactory::ServiceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/mojo/services/mojo_renderer_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_renderer_factory.h
diff --git a/media/mojo/services/mojo_renderer_factory.h b/media/mojo/services/mojo_renderer_factory.h
index 3290b74ca0df5cac495e47e2abc863dc21ea6d71..5ebcffa879bcda732f9a35be5419cdbb1bf6b68d 100644
--- a/media/mojo/services/mojo_renderer_factory.h
+++ b/media/mojo/services/mojo_renderer_factory.h
@@ -7,14 +7,28 @@
#include "media/base/media_export.h"
#include "media/base/renderer_factory.h"
-#include "mojo/public/interfaces/application/service_provider.mojom.h"
+#include "media/mojo/interfaces/media_renderer.mojom.h"
+#include "mojo/public/cpp/bindings/interface_ptr.h"
namespace media {
// The default factory class for creating MojoRendererImpl.
class MEDIA_EXPORT MojoRendererFactory : public RendererFactory {
public:
- MojoRendererFactory(mojo::ServiceProviderPtr renderer_service_provider);
+ // A class that can help get a mojo::MediaRenderer service for
+ // MojoRendererFactory.
+ class ServiceProvider {
+ public:
+ ServiceProvider() {};
+ virtual ~ServiceProvider() {};
+ virtual void ConnectToService(
+ mojo::InterfacePtr<mojo::MediaRenderer>* media_renderer_ptr) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ServiceProvider);
+ };
+
+ explicit MojoRendererFactory(scoped_ptr<ServiceProvider> service_provider);
~MojoRendererFactory() final;
scoped_ptr<Renderer> CreateRenderer(
@@ -22,7 +36,7 @@ class MEDIA_EXPORT MojoRendererFactory : public RendererFactory {
AudioRendererSink* audio_renderer_sink) final;
private:
- mojo::ServiceProviderPtr renderer_service_provider_;
+ scoped_ptr<ServiceProvider> service_provider_;
DISALLOW_COPY_AND_ASSIGN(MojoRendererFactory);
};
« no previous file with comments | « no previous file | media/mojo/services/mojo_renderer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698