Commit c9a98bff authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

Clean up old Mojo types for mojom::Receiver

This CL cleans up old Mojo types for mojom::Receiver using
Receiver.

Bug: 955171
Change-Id: I5ad59189f2759a6df51d768dedf78d1dd95d18c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890382Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#711535}
parent f90955af
......@@ -104,12 +104,9 @@ void VideoSourceImpl::OnCreateDeviceResponse(
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
switch (result_code) {
case mojom::DeviceAccessResultCode::SUCCESS: {
mojo::PendingRemote<mojom::Receiver> broadcaster_as_receiver;
broadcaster_binding_ = std::make_unique<mojo::Binding<mojom::Receiver>>(
&broadcaster_,
broadcaster_as_receiver.InitWithNewPipeAndPassReceiver());
broadcaster_receiver_.reset();
device_->Start(device_start_settings_,
std::move(broadcaster_as_receiver));
broadcaster_receiver_.BindNewPipeAndPassRemote());
device_status_ = DeviceStatus::kStarted;
if (push_subscriptions_.empty()) {
StopDeviceAsynchronously();
......
......@@ -12,6 +12,7 @@
#include "mojo/public/cpp/bindings/binding_set.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 "services/video_capture/broadcasting_receiver.h"
#include "services/video_capture/device_factory_media_to_mojo_adapter.h"
......@@ -68,7 +69,7 @@ class VideoSourceImpl : public mojom::VideoSource {
std::unique_ptr<PushVideoStreamSubscriptionImpl>>
push_subscriptions_;
BroadcastingReceiver broadcaster_;
std::unique_ptr<mojo::Binding<mojom::Receiver>> broadcaster_binding_;
mojo::Receiver<mojom::Receiver> broadcaster_receiver_{&broadcaster_};
DeviceStatus device_status_;
mojo::Remote<mojom::Device> device_;
media::VideoCaptureParams device_start_settings_;
......
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