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

Side by Side Diff: media/mojo/services/mojo_media_application.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/scoped_ptr.h" 5 #include "base/memory/ref_counted.h"
6 #include "media/mojo/interfaces/content_decryption_module.mojom.h" 6 #include "media/mojo/interfaces/service_factory.mojom.h"
7 #include "media/mojo/interfaces/media_renderer.mojom.h"
8 #include "media/mojo/services/mojo_cdm_service_context.h"
9 #include "mojo/application/public/cpp/application_delegate.h" 7 #include "mojo/application/public/cpp/application_delegate.h"
10 #include "mojo/application/public/cpp/interface_factory_impl.h" 8 #include "mojo/application/public/cpp/interface_factory_impl.h"
11 #include "url/gurl.h" 9 #include "url/gurl.h"
12 10
13 namespace media { 11 namespace media {
14 12
15 class CdmFactory;
16 class MediaLog; 13 class MediaLog;
17 class RendererFactory;
18 14
19 class MojoMediaApplication 15 class MojoMediaApplication
20 : public mojo::ApplicationDelegate, 16 : public mojo::ApplicationDelegate,
21 public mojo::InterfaceFactory<interfaces::ContentDecryptionModule>, 17 public mojo::InterfaceFactory<interfaces::ServiceFactory> {
22 public mojo::InterfaceFactory<interfaces::MediaRenderer> {
23 public: 18 public:
24 static GURL AppUrl(); 19 static GURL AppUrl();
25 static scoped_ptr<mojo::ApplicationDelegate> CreateApp(); 20 static scoped_ptr<mojo::ApplicationDelegate> CreateApp();
26 21
27 MojoMediaApplication(); 22 MojoMediaApplication();
28 ~MojoMediaApplication() final; 23 ~MojoMediaApplication() final;
29 24
30 private: 25 private:
31 // mojo::ApplicationDelegate implementation. 26 // mojo::ApplicationDelegate implementation.
32 void Initialize(mojo::ApplicationImpl* app) final; 27 void Initialize(mojo::ApplicationImpl* app) final;
33 bool ConfigureIncomingConnection( 28 bool ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) final; 29 mojo::ApplicationConnection* connection) final;
35 30
36 // mojo::InterfaceFactory<interfaces::ContentDecryptionModule> implementation. 31 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation.
37 void Create(mojo::ApplicationConnection* connection, 32 void Create(mojo::ApplicationConnection* connection,
38 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> 33 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final;
39 request) final;
40 34
41 // mojo::InterfaceFactory<interfaces::MediaRenderer> implementation.
42 void Create(mojo::ApplicationConnection* connection,
43 mojo::InterfaceRequest<interfaces::MediaRenderer> request) final;
44
45 RendererFactory* GetRendererFactory();
46 CdmFactory* GetCdmFactory();
47
48 MojoCdmServiceContext cdm_service_context_;
49 scoped_ptr<RendererFactory> renderer_factory_;
50 scoped_ptr<CdmFactory> cdm_factory_;
51 scoped_refptr<MediaLog> media_log_; 35 scoped_refptr<MediaLog> media_log_;
52 }; 36 };
53 37
54 } // namespace media 38 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_cdm_service_context.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698