Commit ca1ee14f authored by Dan Sanders's avatar Dan Sanders Committed by Commit Bot

[media] Tidy media_service.h member order and comments.

Change-Id: I7263f9f0291b14f5bc0e4831b371465b073ebc96
Reviewed-on: https://chromium-review.googlesource.com/786639Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520833}
parent a0270165
......@@ -38,6 +38,9 @@ void MediaService::OnStart() {
ref_factory_.reset(new service_manager::ServiceContextRefFactory(
base::Bind(&service_manager::ServiceContext::RequestQuit,
base::Unretained(context()))));
// TODO(liberato): Remove plumbing for the ref factory once
// MediaCodecVideoDecoder no longer takes a ref. (crbug.com/783973)
mojo_media_client_->Initialize(context()->connector(), ref_factory_.get());
}
......
......@@ -62,16 +62,21 @@ class MEDIA_MOJO_EXPORT MediaService : public service_manager::Service,
mojom::InterfaceFactoryRequest request,
service_manager::mojom::InterfaceProviderPtr host_interfaces) final;
MediaLog media_log_;
std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
// Note: Since each instance runs on a different thread, do not share a common
// MojoMediaClient with other instances to avoid threading issues. Hence using
// a unique_ptr here.
//
// Note: Since |*ref_factory_| is passed to |mojo_media_client_|,
// |mojo_media_client_| must be destructed before |ref_factory_|.
std::unique_ptr<MojoMediaClient> mojo_media_client_;
// Note: Since |&media_log_| is passed to bindings, the bindings must be
// destructed first.
mojo::StrongBindingSet<mojom::InterfaceFactory> interface_factory_bindings_;
MediaLog media_log_;
std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
service_manager::BinderRegistry registry_;
mojo::BindingSet<mojom::MediaService> bindings_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment