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

Clean up old Mojo type for mojom::ContentDecryptionModuleClient

This CL cleans up old mojo types for mojom::ContentDecryptionModuleClient
using AssociatedReceiver.

Bug: 955171
Change-Id: I4759d6f44fbd8a4dcc78659b316c660cba603ba5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903229Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#714061}
parent 05ef4a0c
...@@ -69,7 +69,6 @@ MojoCdm::MojoCdm(mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm, ...@@ -69,7 +69,6 @@ MojoCdm::MojoCdm(mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm,
const SessionExpirationUpdateCB& session_expiration_update_cb) const SessionExpirationUpdateCB& session_expiration_update_cb)
: remote_cdm_(std::move(remote_cdm)), : remote_cdm_(std::move(remote_cdm)),
interface_factory_(interface_factory), interface_factory_(interface_factory),
client_binding_(this),
cdm_id_(CdmContext::kInvalidCdmId), cdm_id_(CdmContext::kInvalidCdmId),
session_message_cb_(session_message_cb), session_message_cb_(session_message_cb),
session_closed_cb_(session_closed_cb), session_closed_cb_(session_closed_cb),
...@@ -81,9 +80,7 @@ MojoCdm::MojoCdm(mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm, ...@@ -81,9 +80,7 @@ MojoCdm::MojoCdm(mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm,
DCHECK(session_keys_change_cb_); DCHECK(session_keys_change_cb_);
DCHECK(session_expiration_update_cb_); DCHECK(session_expiration_update_cb_);
mojom::ContentDecryptionModuleClientAssociatedPtrInfo client_ptr_info; remote_cdm_->SetClient(client_receiver_.BindNewEndpointAndPassRemote());
client_binding_.Bind(mojo::MakeRequest(&client_ptr_info));
remote_cdm_->SetClient(std::move(client_ptr_info));
} }
MojoCdm::~MojoCdm() { MojoCdm::~MojoCdm() {
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "media/base/cdm_session_tracker.h" #include "media/base/cdm_session_tracker.h"
#include "media/base/content_decryption_module.h" #include "media/base/content_decryption_module.h"
#include "media/mojo/mojom/content_decryption_module.mojom.h" #include "media/mojo/mojom/content_decryption_module.mojom.h"
#include "mojo/public/cpp/bindings/associated_binding.h" #include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/remote.h"
...@@ -142,7 +141,8 @@ class MojoCdm : public ContentDecryptionModule, ...@@ -142,7 +141,8 @@ class MojoCdm : public ContentDecryptionModule,
mojo::Remote<mojom::ContentDecryptionModule> remote_cdm_; mojo::Remote<mojom::ContentDecryptionModule> remote_cdm_;
mojom::InterfaceFactory* interface_factory_; mojom::InterfaceFactory* interface_factory_;
mojo::AssociatedBinding<ContentDecryptionModuleClient> client_binding_; mojo::AssociatedReceiver<ContentDecryptionModuleClient> client_receiver_{
this};
// Protects |cdm_id_|, |decryptor_ptr_|, |decryptor_| and // Protects |cdm_id_|, |decryptor_ptr_|, |decryptor_| and
// |decryptor_task_runner_| which could be accessed from other threads. // |decryptor_task_runner_| which could be accessed from other threads.
......
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