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

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

Issue 1230313010: media: Add ServiceFactory mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 5 months 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 | « media/mojo/services/mojo_renderer_service.cc ('k') | media/mojo/services/service_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/service_factory_impl.h
diff --git a/media/mojo/services/service_factory_impl.h b/media/mojo/services/service_factory_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ad5fbcea0f584af39e50debcdd8ccb25cee5fa3
--- /dev/null
+++ b/media/mojo/services/service_factory_impl.h
@@ -0,0 +1,54 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
+#define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
+
+#include "base/macros.h"
+#include "media/mojo/interfaces/service_factory.mojom.h"
+#include "media/mojo/services/mojo_cdm_service_context.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace mojo {
+class ServiceProvider;
+}
+
+namespace media {
+
+class CdmFactory;
+class MediaLog;
+class RendererFactory;
+
+class ServiceFactoryImpl : public interfaces::ServiceFactory {
+ public:
+ ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request,
+ mojo::ServiceProvider* service_provider,
+ scoped_refptr<MediaLog> media_log);
+ ~ServiceFactoryImpl() final;
+
+ // interfaces::ServiceFactory implementation.
+ void CreateRenderer(
+ mojo::InterfaceRequest<interfaces::MediaRenderer> renderer) final;
+ void CreateCdm(
+ mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final;
+
+ private:
+ RendererFactory* GetRendererFactory();
+ CdmFactory* GetCdmFactory();
+
+ MojoCdmServiceContext cdm_service_context_;
+
+ mojo::StrongBinding<interfaces::ServiceFactory> binding_;
+ mojo::ServiceProvider* service_provider_;
+ scoped_refptr<MediaLog> media_log_;
+
+ scoped_ptr<RendererFactory> renderer_factory_;
+ scoped_ptr<CdmFactory> cdm_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
+};
+
+} // namespace media
+
+#endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
« no previous file with comments | « media/mojo/services/mojo_renderer_service.cc ('k') | media/mojo/services/service_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698