diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/components/arc/camera | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/arc/camera')
-rw-r--r-- | chromium/components/arc/camera/arc_camera_bridge.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chromium/components/arc/camera/arc_camera_bridge.cc b/chromium/components/arc/camera/arc_camera_bridge.cc index bae4746abb7..59588699993 100644 --- a/chromium/components/arc/camera/arc_camera_bridge.cc +++ b/chromium/components/arc/camera/arc_camera_bridge.cc @@ -16,6 +16,7 @@ #include "components/arc/session/arc_bridge_service.h" #include "crypto/random.h" #include "media/capture/video/chromeos/camera_hal_dispatcher_impl.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/platform/platform_channel.h" #include "mojo/public/cpp/system/invitation.h" #include "mojo/public/cpp/system/platform_handle.h" @@ -53,9 +54,10 @@ class ArcCameraBridge::PendingStartCameraServiceResult { mojo::ScopedMessagePipeHandle pipe, ArcCameraBridge::StartCameraServiceCallback callback) : owner_(owner), - service_(mojom::CameraServicePtrInfo(std::move(pipe), 0u)), + service_( + mojo::PendingRemote<mojom::CameraService>(std::move(pipe), 0u)), callback_(std::move(callback)) { - service_.set_connection_error_handler( + service_.set_disconnect_handler( base::BindOnce(&PendingStartCameraServiceResult::OnError, weak_ptr_factory_.GetWeakPtr())); service_.QueryVersion( @@ -78,13 +80,13 @@ class ArcCameraBridge::PendingStartCameraServiceResult { // Runs the callback and removes this object from the owner. void Finish() { DCHECK(callback_); - std::move(callback_).Run(std::move(service_)); + std::move(callback_).Run(service_.Unbind()); // Destructs |this|. owner_->pending_start_camera_service_results_.erase(this); } ArcCameraBridge* const owner_; - mojom::CameraServicePtr service_; + mojo::Remote<mojom::CameraService> service_; ArcCameraBridge::StartCameraServiceCallback callback_; base::WeakPtrFactory<PendingStartCameraServiceResult> weak_ptr_factory_{this}; |