Commit 277f6bdd authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

Migrate references to mirroring.mojom.CastMessageChannel to new mojo types

Convert the remaining bits that still use the old mojo types for
mirroring::mojom::CastMessageChannel to the new mojo types, and adapt
unit tests.

Bug: 955171
Change-Id: I8ccd2d4a7c4e7954954200a2e7b09fd3f2c3ab6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807496
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Reviewed-by: default avatarBrandon Tolsch <btolsch@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697956}
parent c337fbd0
......@@ -181,8 +181,8 @@ CastMirroringServiceHost::~CastMirroringServiceHost() {}
void CastMirroringServiceHost::Start(
mojom::SessionParametersPtr session_params,
mojom::SessionObserverPtr observer,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel) {
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel) {
// Start() should not be called in the middle of a mirroring session.
if (mirroring_service_) {
LOG(WARNING) << "Unexpected Start() call during an active"
......
......@@ -20,6 +20,7 @@
#include "extensions/buildflags/buildflags.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "ui/gfx/geometry/size.h"
......@@ -73,8 +74,9 @@ class CastMirroringServiceHost final : public mojom::MirroringServiceHost,
// mojom::MirroringServiceHost implementation.
void Start(mojom::SessionParametersPtr session_params,
mojom::SessionObserverPtr observer,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel) override;
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel)
override;
private:
friend class CastMirroringServiceHostBrowserTest;
......
......@@ -130,8 +130,7 @@ class CastMirroringServiceHostBrowserTest
public mojom::CastMessageChannel,
public mojom::AudioStreamCreatorClient {
public:
CastMirroringServiceHostBrowserTest()
: observer_binding_(this), outbound_channel_binding_(this) {}
CastMirroringServiceHostBrowserTest() : observer_binding_(this) {}
~CastMirroringServiceHostBrowserTest() override {}
protected:
......@@ -144,11 +143,12 @@ class CastMirroringServiceHostBrowserTest
BuildMediaIdForTabMirroring(web_contents));
mojom::SessionObserverPtr observer;
observer_binding_.Bind(mojo::MakeRequest(&observer));
mojom::CastMessageChannelPtr outbound_channel;
outbound_channel_binding_.Bind(mojo::MakeRequest(&outbound_channel));
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel;
outbound_channel_receiver_.Bind(
outbound_channel.InitWithNewPipeAndPassReceiver());
host_->Start(mojom::SessionParameters::New(), std::move(observer),
std::move(outbound_channel),
mojo::MakeRequest(&inbound_channel_));
inbound_channel_.BindNewPipeAndPassReceiver());
}
void GetVideoCaptureHost() {
......@@ -231,9 +231,9 @@ class CastMirroringServiceHostBrowserTest
}
mojo::Binding<mojom::SessionObserver> observer_binding_;
mojo::Binding<mojom::CastMessageChannel> outbound_channel_binding_;
mojo::Receiver<mojom::CastMessageChannel> outbound_channel_receiver_{this};
mojo::Receiver<mojom::AudioStreamCreatorClient> audio_client_receiver_{this};
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
std::unique_ptr<CastMirroringServiceHost> host_;
std::unique_ptr<MockVideoCaptureObserver> video_frame_receiver_;
......
......@@ -27,6 +27,7 @@
#include "components/cast_channel/proto/cast_channel.pb.h"
#include "components/mirroring/mojom/session_parameters.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/base/ip_address.h"
#include "third_party/blink/public/mojom/presentation/presentation.mojom.h"
......@@ -34,7 +35,6 @@ using blink::mojom::PresentationConnectionMessagePtr;
using cast_channel::Result;
using media_router::mojom::MediaRouteProvider;
using media_router::mojom::MediaRouter;
using mirroring::mojom::CastMessageChannelPtr;
using mirroring::mojom::SessionError;
using mirroring::mojom::SessionObserverPtr;
using mirroring::mojom::SessionParameters;
......@@ -74,8 +74,8 @@ MirroringActivityRecord::MirroringActivityRecord(
// Create Mojo bindings for the interfaces this object implements.
SessionObserverPtr observer_ptr;
observer_binding_.Bind(mojo::MakeRequest(&observer_ptr));
CastMessageChannelPtr channel_ptr;
channel_binding_.Bind(mojo::MakeRequest(&channel_ptr));
mojo::PendingRemote<mirroring::mojom::CastMessageChannel> channel_remote;
channel_receiver_.Bind(channel_remote.InitWithNewPipeAndPassReceiver());
// Derive session type from capabilities.
const bool has_audio = (cast_data.capabilities &
......@@ -94,8 +94,8 @@ MirroringActivityRecord::MirroringActivityRecord(
base::Unretained(host_.get()),
SessionParameters::New(session_type, cast_data.ip_endpoint.address(),
cast_data.model_name),
std::move(observer_ptr), std::move(channel_ptr),
mojo::MakeRequest(&channel_to_service_));
std::move(observer_ptr), std::move(channel_remote),
channel_to_service_.BindNewPipeAndPassReceiver());
}
MirroringActivityRecord::~MirroringActivityRecord() = default;
......
......@@ -18,6 +18,8 @@
#include "components/mirroring/mojom/mirroring_service_host.mojom.h"
#include "components/mirroring/mojom/session_observer.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
namespace media_router {
......@@ -93,13 +95,13 @@ class MirroringActivityRecord : public ActivityRecord,
mojo::Remote<mirroring::mojom::MirroringServiceHost> host_;
// Sends Cast messages from the mirroring receiver to the mirroring service.
mirroring::mojom::CastMessageChannelPtr channel_to_service_;
mojo::Remote<mirroring::mojom::CastMessageChannel> channel_to_service_;
mojo::Binding<mirroring::mojom::SessionObserver> observer_binding_{this};
// To handle Cast messages from the mirroring service to the mirroring
// receiver.
mojo::Binding<mirroring::mojom::CastMessageChannel> channel_binding_{this};
mojo::Receiver<mirroring::mojom::CastMessageChannel> channel_receiver_{this};
const int channel_id_;
const MirroringType mirroring_type_;
......
......@@ -22,6 +22,6 @@ interface MirroringService {
gfx.mojom.Size max_resolution,
SessionObserver observer,
ResourceProvider resource_provider,
CastMessageChannel outbound_channel,
CastMessageChannel& inbound_channel);
pending_remote<CastMessageChannel> outbound_channel,
pending_receiver<CastMessageChannel> inbound_channel);
};
......@@ -18,8 +18,8 @@ interface MirroringServiceHost {
// To stop the session, just close the message pipe.
Start(SessionParameters params,
SessionObserver observer,
CastMessageChannel outbound_channel,
CastMessageChannel& inbound_channel);
pending_remote<CastMessageChannel> outbound_channel,
pending_receiver<CastMessageChannel> inbound_channel);
// TODO(xjz): Add interfaces to get the streaming events/stats and mirroring
// logs.
......
......@@ -12,6 +12,9 @@
#include "components/mirroring/service/message_dispatcher.h"
#include "components/mirroring/service/mirror_settings.h"
#include "media/cast/cast_environment.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -69,9 +72,8 @@ class MediaRemoterTest : public mojom::CastMessageChannel,
public ::testing::Test {
public:
MediaRemoterTest()
: binding_(this),
message_dispatcher_(CreateInterfacePtrAndBind(),
mojo::MakeRequest(&inbound_channel_),
: message_dispatcher_(receiver_.BindNewPipeAndPassRemote(),
inbound_channel_.BindNewPipeAndPassReceiver(),
error_callback_.Get()),
sink_metadata_(DefaultSinkMetadata()) {}
~MediaRemoterTest() override { task_environment_.RunUntilIdle(); }
......@@ -164,16 +166,10 @@ class MediaRemoterTest : public mojom::CastMessageChannel,
}
private:
mojom::CastMessageChannelPtr CreateInterfacePtrAndBind() {
mojom::CastMessageChannelPtr outbound_channel_ptr;
binding_.Bind(mojo::MakeRequest(&outbound_channel_ptr));
return outbound_channel_ptr;
}
base::test::TaskEnvironment task_environment_;
mojo::Binding<mojom::CastMessageChannel> binding_;
mojo::Receiver<mojom::CastMessageChannel> receiver_{this};
base::MockCallback<MessageDispatcher::ErrorCallback> error_callback_;
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
MessageDispatcher message_dispatcher_;
const media::mojom::RemotingSinkMetadata sink_metadata_;
MockRemotingSource remoting_source_;
......
......@@ -50,11 +50,11 @@ class MessageDispatcher::RequestHolder {
};
MessageDispatcher::MessageDispatcher(
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel,
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel,
ErrorCallback error_callback)
: outbound_channel_(std::move(outbound_channel)),
binding_(this, std::move(inbound_channel)),
receiver_(this, std::move(inbound_channel)),
error_callback_(std::move(error_callback)),
last_sequence_number_(base::RandInt(0, 1e9)) {
DCHECK(outbound_channel_);
......
......@@ -11,7 +11,10 @@
#include "base/macros.h"
#include "components/mirroring/mojom/cast_message_channel.mojom.h"
#include "components/mirroring/service/receiver_response.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
namespace mirroring {
......@@ -22,9 +25,10 @@ class COMPONENT_EXPORT(MIRRORING_SERVICE) MessageDispatcher final
: public mojom::CastMessageChannel {
public:
using ErrorCallback = base::RepeatingCallback<void(const std::string&)>;
MessageDispatcher(mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel,
ErrorCallback error_callback);
MessageDispatcher(
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel,
ErrorCallback error_callback);
~MessageDispatcher() override;
using ResponseCallback =
......@@ -61,9 +65,9 @@ class COMPONENT_EXPORT(MIRRORING_SERVICE) MessageDispatcher final
void Send(mojom::CastMessagePtr message) override;
// Takes care of sending outbound messages.
const mojom::CastMessageChannelPtr outbound_channel_;
const mojo::Remote<mojom::CastMessageChannel> outbound_channel_;
const mojo::Binding<mojom::CastMessageChannel> binding_;
const mojo::Receiver<mojom::CastMessageChannel> receiver_;
const ErrorCallback error_callback_;
......
......@@ -11,6 +11,9 @@
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -57,11 +60,12 @@ void CloneResponse(const ReceiverResponse& response,
class MessageDispatcherTest : public mojom::CastMessageChannel,
public ::testing::Test {
public:
MessageDispatcherTest() : binding_(this) {
mojom::CastMessageChannelPtr outbound_channel;
binding_.Bind(mojo::MakeRequest(&outbound_channel));
MessageDispatcherTest() {
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel;
receiver_.Bind(outbound_channel.InitWithNewPipeAndPassReceiver());
message_dispatcher_ = std::make_unique<MessageDispatcher>(
std::move(outbound_channel), mojo::MakeRequest(&inbound_channel_),
std::move(outbound_channel),
inbound_channel_.BindNewPipeAndPassReceiver(),
base::BindRepeating(&MessageDispatcherTest::OnParsingError,
base::Unretained(this)));
message_dispatcher_->Subscribe(
......@@ -111,8 +115,8 @@ class MessageDispatcherTest : public mojom::CastMessageChannel,
std::unique_ptr<ReceiverResponse> last_status_response_;
private:
mojo::Binding<mojom::CastMessageChannel> binding_;
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Receiver<mojom::CastMessageChannel> receiver_{this};
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
DISALLOW_COPY_AND_ASSIGN(MessageDispatcherTest);
};
......
......@@ -19,12 +19,13 @@ MirroringService::MirroringService(
MirroringService::~MirroringService() = default;
void MirroringService::Start(mojom::SessionParametersPtr params,
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel) {
void MirroringService::Start(
mojom::SessionParametersPtr params,
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel) {
session_.reset(); // Stops the current session if active.
session_ = std::make_unique<Session>(
std::move(params), max_resolution, std::move(observer),
......
......@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "components/mirroring/mojom/mirroring_service.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
namespace mirroring {
......@@ -28,8 +29,9 @@ class COMPONENT_EXPORT(MIRRORING_SERVICE) MirroringService final
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel) override;
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel)
override;
mojo::Receiver<mojom::MirroringService> receiver_;
const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
......
......@@ -373,13 +373,14 @@ class Session::AudioCapturingCallback final
DISALLOW_COPY_AND_ASSIGN(AudioCapturingCallback);
};
Session::Session(mojom::SessionParametersPtr session_params,
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
Session::Session(
mojom::SessionParametersPtr session_params,
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
: session_params_(*session_params),
state_(MIRRORING),
observer_(std::move(observer)),
......
......@@ -64,8 +64,8 @@ class COMPONENT_EXPORT(MIRRORING_SERVICE) Session final
const gfx::Size& max_resolution,
mojom::SessionObserverPtr observer,
mojom::ResourceProviderPtr resource_provider,
mojom::CastMessageChannelPtr outbound_channel,
mojom::CastMessageChannelRequest inbound_channel,
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel,
mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
~Session() override;
......
......@@ -18,6 +18,9 @@
#include "components/mirroring/service/wifi_status_monitor.h"
#include "media/cast/cast_environment.h"
#include "media/cast/test/utility/net_utility.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/ip_endpoint.h"
#include "services/network/test/test_url_loader_factory.h"
......@@ -87,9 +90,8 @@ class SessionMonitorTest : public mojom::CastMessageChannel,
public:
SessionMonitorTest()
: receiver_address_(media::cast::test::GetFreeLocalPort().address()),
binding_(this),
message_dispatcher_(CreateInterfacePtrAndBind(),
mojo::MakeRequest(&inbound_channel_),
message_dispatcher_(receiver_.BindNewPipeAndPassRemote(),
inbound_channel_.BindNewPipeAndPassReceiver(),
error_callback_.Get()) {}
~SessionMonitorTest() override {}
......@@ -213,16 +215,10 @@ class SessionMonitorTest : public mojom::CastMessageChannel,
}
private:
mojom::CastMessageChannelPtr CreateInterfacePtrAndBind() {
mojom::CastMessageChannelPtr outbound_channel_ptr;
binding_.Bind(mojo::MakeRequest(&outbound_channel_ptr));
return outbound_channel_ptr;
}
base::test::TaskEnvironment task_environment_;
const net::IPAddress receiver_address_;
mojo::Binding<mojom::CastMessageChannel> binding_;
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Receiver<mojom::CastMessageChannel> receiver_{this};
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
base::MockCallback<MessageDispatcher::ErrorCallback> error_callback_;
MessageDispatcher message_dispatcher_;
network::TestURLLoaderFactory* url_loader_factory_ = nullptr;
......
......@@ -21,6 +21,7 @@
#include "media/cast/test/utility/net_utility.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/ip_address.h"
......@@ -78,8 +79,7 @@ class SessionTest : public mojom::ResourceProvider,
SessionTest()
: receiver_endpoint_(media::cast::test::GetFreeLocalPort()),
resource_provider_binding_(this),
session_observer_binding_(this),
outbound_channel_binding_(this) {}
session_observer_binding_(this) {}
~SessionTest() override { task_environment_.RunUntilIdle(); }
......@@ -204,10 +204,11 @@ class SessionTest : public mojom::ResourceProvider,
cast_mode_ = "mirroring";
mojom::ResourceProviderPtr resource_provider_ptr;
mojom::SessionObserverPtr session_observer_ptr;
mojom::CastMessageChannelPtr outbound_channel_ptr;
mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel_remote;
resource_provider_binding_.Bind(mojo::MakeRequest(&resource_provider_ptr));
session_observer_binding_.Bind(mojo::MakeRequest(&session_observer_ptr));
outbound_channel_binding_.Bind(mojo::MakeRequest(&outbound_channel_ptr));
outbound_channel_receiver_.Bind(
outbound_channel_remote.InitWithNewPipeAndPassReceiver());
// Expect to send OFFER message when session is created.
EXPECT_CALL(*this, OnGetNetworkContext()).Times(1);
EXPECT_CALL(*this, OnError(_)).Times(0);
......@@ -215,8 +216,8 @@ class SessionTest : public mojom::ResourceProvider,
session_ = std::make_unique<Session>(
std::move(session_params), gfx::Size(1920, 1080),
std::move(session_observer_ptr), std::move(resource_provider_ptr),
std::move(outbound_channel_ptr), mojo::MakeRequest(&inbound_channel_),
nullptr);
std::move(outbound_channel_remote),
inbound_channel_.BindNewPipeAndPassReceiver(), nullptr);
task_environment_.RunUntilIdle();
Mock::VerifyAndClear(this);
}
......@@ -342,8 +343,8 @@ class SessionTest : public mojom::ResourceProvider,
const net::IPEndPoint receiver_endpoint_;
mojo::Binding<mojom::ResourceProvider> resource_provider_binding_;
mojo::Binding<mojom::SessionObserver> session_observer_binding_;
mojo::Binding<mojom::CastMessageChannel> outbound_channel_binding_;
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Receiver<mojom::CastMessageChannel> outbound_channel_receiver_{this};
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
SessionType session_type_ = SessionType::AUDIO_AND_VIDEO;
mojo::Remote<media::mojom::Remoter> remoter_;
MockRemotingSource remoting_source_;
......
......@@ -13,6 +13,9 @@
#include "base/values.h"
#include "components/mirroring/service/message_dispatcher.h"
#include "components/mirroring/service/value_util.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -53,9 +56,8 @@ class WifiStatusMonitorTest : public mojom::CastMessageChannel,
public ::testing::Test {
public:
WifiStatusMonitorTest()
: binding_(this),
message_dispatcher_(CreateInterfacePtrAndBind(),
mojo::MakeRequest(&inbound_channel_),
: message_dispatcher_(receiver_.BindNewPipeAndPassRemote(),
inbound_channel_.BindNewPipeAndPassReceiver(),
error_callback_.Get()) {}
~WifiStatusMonitorTest() override {}
......@@ -122,15 +124,9 @@ class WifiStatusMonitorTest : public mojom::CastMessageChannel,
void RunUntilIdle() { task_environment_.RunUntilIdle(); }
private:
mojom::CastMessageChannelPtr CreateInterfacePtrAndBind() {
mojom::CastMessageChannelPtr outbound_channel_ptr;
binding_.Bind(mojo::MakeRequest(&outbound_channel_ptr));
return outbound_channel_ptr;
}
base::test::TaskEnvironment task_environment_;
mojo::Binding<mojom::CastMessageChannel> binding_;
mojom::CastMessageChannelPtr inbound_channel_;
mojo::Receiver<mojom::CastMessageChannel> receiver_{this};
mojo::Remote<mojom::CastMessageChannel> inbound_channel_;
base::MockCallback<MessageDispatcher::ErrorCallback> error_callback_;
MessageDispatcher message_dispatcher_;
CastMessage last_outbound_message_;
......
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