OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ | 5 #ifndef MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ |
6 #define MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ | 6 #define MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ |
7 | 7 |
8 #include "mojo/common/binding_set.h" | 8 #include "mojo/common/binding_set.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | |
10 #include "mojo/public/cpp/application/application_impl.h" | |
11 #include "mojo/services/media/control/interfaces/media_factory.mojom.h" | 9 #include "mojo/services/media/control/interfaces/media_factory.mojom.h" |
12 #include "services/util/cpp/factory_service_base.h" | 10 #include "services/util/cpp/factory_service_base.h" |
13 | 11 |
14 namespace mojo { | 12 namespace mojo { |
15 namespace media { | 13 namespace media { |
16 | 14 |
17 class MediaFactoryService : public util::FactoryServiceBase, | 15 class MediaFactoryService : public util::FactoryServiceBase, |
18 public MediaFactory { | 16 public MediaFactory { |
19 public: | 17 public: |
20 MediaFactoryService(); | 18 MediaFactoryService(); |
21 | 19 |
22 ~MediaFactoryService() override; | 20 ~MediaFactoryService() override; |
23 | 21 |
24 // ApplicationDelegate implementation. | 22 // ApplicationImplBase override. |
25 bool ConfigureIncomingConnection( | 23 bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override; |
26 ServiceProviderImpl* service_provider_impl) override; | |
27 | 24 |
28 // MediaFactory implementation. | 25 // MediaFactory implementation. |
29 void CreatePlayer(InterfaceHandle<SeekingReader> reader, | 26 void CreatePlayer(InterfaceHandle<SeekingReader> reader, |
30 InterfaceRequest<MediaPlayer> player) override; | 27 InterfaceRequest<MediaPlayer> player) override; |
31 | 28 |
32 void CreateSource(InterfaceHandle<SeekingReader> reader, | 29 void CreateSource(InterfaceHandle<SeekingReader> reader, |
33 Array<MediaTypeSetPtr> allowed_media_types, | 30 Array<MediaTypeSetPtr> allowed_media_types, |
34 InterfaceRequest<MediaSource> source) override; | 31 InterfaceRequest<MediaSource> source) override; |
35 | 32 |
36 void CreateSink(const String& destination_url, | 33 void CreateSink(const String& destination_url, |
(...skipping 13 matching lines...) Expand all Loading... |
50 InterfaceRequest<MediaTimelineController> timeline_controller) override; | 47 InterfaceRequest<MediaTimelineController> timeline_controller) override; |
51 | 48 |
52 private: | 49 private: |
53 BindingSet<MediaFactory> bindings_; | 50 BindingSet<MediaFactory> bindings_; |
54 }; | 51 }; |
55 | 52 |
56 } // namespace media | 53 } // namespace media |
57 } // namespace mojo | 54 } // namespace mojo |
58 | 55 |
59 #endif // MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ | 56 #endif // MOJO_SERVICES_MEDIA_FACTORY_FACTORY_SERVICE_H_ |
OLD | NEW |