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

Side by Side Diff: media/mojo/services/media_service.h

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « mash/webtest/webtest.cc ('k') | media/mojo/services/media_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ 6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 public NON_EXPORTED_BASE( 33 public NON_EXPORTED_BASE(
34 service_manager::InterfaceFactory<mojom::MediaService>), 34 service_manager::InterfaceFactory<mojom::MediaService>),
35 public NON_EXPORTED_BASE(mojom::MediaService) { 35 public NON_EXPORTED_BASE(mojom::MediaService) {
36 public: 36 public:
37 explicit MediaService(std::unique_ptr<MojoMediaClient> mojo_media_client); 37 explicit MediaService(std::unique_ptr<MojoMediaClient> mojo_media_client);
38 ~MediaService() final; 38 ~MediaService() final;
39 39
40 private: 40 private:
41 // service_manager::Service implementation. 41 // service_manager::Service implementation.
42 void OnStart() final; 42 void OnStart() final;
43 void OnBindInterface(const service_manager::ServiceInfo& source_info, 43 void OnBindInterface(const service_manager::BindSourceInfo& source_info,
44 const std::string& interface_name, 44 const std::string& interface_name,
45 mojo::ScopedMessagePipeHandle interface_pipe) override; 45 mojo::ScopedMessagePipeHandle interface_pipe) override;
46 bool OnServiceManagerConnectionLost() final; 46 bool OnServiceManagerConnectionLost() final;
47 47
48 // service_manager::InterfaceFactory<mojom::MediaService> implementation. 48 // service_manager::InterfaceFactory<mojom::MediaService> implementation.
49 void Create(const service_manager::Identity& remote_identity, 49 void Create(const service_manager::Identity& remote_identity,
50 mojom::MediaServiceRequest request) final; 50 mojom::MediaServiceRequest request) final;
51 51
52 // mojom::MediaService implementation. 52 // mojom::MediaService implementation.
53 void CreateInterfaceFactory( 53 void CreateInterfaceFactory(
54 mojom::InterfaceFactoryRequest request, 54 mojom::InterfaceFactoryRequest request,
55 service_manager::mojom::InterfaceProviderPtr host_interfaces) final; 55 service_manager::mojom::InterfaceProviderPtr host_interfaces) final;
56 56
57 // Note: Since each instance runs on a different thread, do not share a common 57 // Note: Since each instance runs on a different thread, do not share a common
58 // MojoMediaClient with other instances to avoid threading issues. Hence using 58 // MojoMediaClient with other instances to avoid threading issues. Hence using
59 // a unique_ptr here. 59 // a unique_ptr here.
60 std::unique_ptr<MojoMediaClient> mojo_media_client_; 60 std::unique_ptr<MojoMediaClient> mojo_media_client_;
61 61
62 MediaLog media_log_; 62 MediaLog media_log_;
63 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; 63 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
64 64
65 service_manager::BinderRegistry registry_; 65 service_manager::BinderRegistry registry_;
66 mojo::BindingSet<mojom::MediaService> bindings_; 66 mojo::BindingSet<mojom::MediaService> bindings_;
67 }; 67 };
68 68
69 } // namespace media 69 } // namespace media
70 70
71 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ 71 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_
OLDNEW
« no previous file with comments | « mash/webtest/webtest.cc ('k') | media/mojo/services/media_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698