Commit 28d91524 authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Clean up AudioLogFactoryPtr in AudioServiceListener class

This CL cleans up AudioLogFactoryPtr that is left in only
AudioServiceListener class with the conversion to new mojo types.

Bug: 955171
Change-Id: Ifd88a1a007120f9aa598d5011e5fa45c210b2a35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871691Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarOlga Sharonova <olka@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709033}
parent 38470625
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
#include "base/time/default_tick_clock.h" #include "base/time/default_tick_clock.h"
#include "content/browser/media/audio_log_factory.h" #include "content/browser/media/audio_log_factory.h"
#include "content/public/common/content_features.h" #include "content/public/common/content_features.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/strong_binding.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/audio/public/mojom/constants.mojom.h" #include "services/audio/public/mojom/constants.mojom.h"
#include "services/audio/public/mojom/log_factory_manager.mojom.h" #include "services/audio/public/mojom/log_factory_manager.mojom.h"
...@@ -219,13 +220,14 @@ void AudioServiceListener::MaybeSetLogFactory() { ...@@ -219,13 +220,14 @@ void AudioServiceListener::MaybeSetLogFactory() {
!connector_ || log_factory_is_set_) !connector_ || log_factory_is_set_)
return; return;
media::mojom::AudioLogFactoryPtr audio_log_factory_ptr; mojo::PendingRemote<media::mojom::AudioLogFactory> audio_log_factory;
mojo::MakeStrongBinding(std::make_unique<AudioLogFactory>(), mojo::MakeSelfOwnedReceiver(
mojo::MakeRequest(&audio_log_factory_ptr)); std::make_unique<AudioLogFactory>(),
audio_log_factory.InitWithNewPipeAndPassReceiver());
mojo::Remote<audio::mojom::LogFactoryManager> log_factory_manager; mojo::Remote<audio::mojom::LogFactoryManager> log_factory_manager;
connector_->Connect(*current_instance_identity_, connector_->Connect(*current_instance_identity_,
log_factory_manager.BindNewPipeAndPassReceiver()); log_factory_manager.BindNewPipeAndPassReceiver());
log_factory_manager->SetLogFactory(audio_log_factory_ptr.PassInterface()); log_factory_manager->SetLogFactory(std::move(audio_log_factory));
log_factory_is_set_ = true; log_factory_is_set_ = true;
} }
......
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