Commit facf7926 authored by Jeffrey Kardatzke's avatar Jeffrey Kardatzke Committed by Chromium LUCI CQ

chromeos: Send the frame origin to the CdmFactoryDaemon

This adds a parameter to CreateCdm so we can pass the origin to the
CdmFactoryDaemon so it can use proper per-site identifiers in
provisioning requests.

BUG=b:153111783
TEST=Verified with corresponding ChromeOS change that origin is sent

Change-Id: Ic2cfbdf54feb173969bee7377acdc244422eccff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613944
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Cr-Commit-Position: refs/heads/master@{#841311}
parent 4b8a0a31
...@@ -227,11 +227,14 @@ void ChromeOsCdmFactory::CreateCdm( ...@@ -227,11 +227,14 @@ void ChromeOsCdmFactory::CreateCdm(
&GetOutputProtectionOnTaskRunner, &GetOutputProtectionOnTaskRunner,
output_protection_remote.InitWithNewPipeAndPassReceiver())); output_protection_remote.InitWithNewPipeAndPassReceiver()));
url::Origin cdm_origin;
frame_interfaces_->GetCdmOrigin(&cdm_origin);
// Now create the remote CDM instance that links everything up. // Now create the remote CDM instance that links everything up.
remote_factory_->CreateCdm(cdm->GetClientInterface(), remote_factory_->CreateCdm(
std::move(storage_remote), cdm->GetClientInterface(), std::move(storage_remote),
std::move(cros_cdm_pending_receiver), std::move(output_protection_remote), cdm_origin.host(),
std::move(output_protection_remote)); std::move(cros_cdm_pending_receiver));
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(cdm_created_cb), std::move(cdm), "")); FROM_HERE, base::BindOnce(std::move(cdm_created_cb), std::move(cdm), ""));
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// interface can also be used to connect directly to the OEMCrypto // interface can also be used to connect directly to the OEMCrypto
// implementation for ARC. // implementation for ARC.
// Next MinVersion: 3 // Next MinVersion: 4
module chromeos.cdm.mojom; module chromeos.cdm.mojom;
...@@ -22,20 +22,23 @@ import "components/arc/mojom/protected_buffer_manager.mojom"; ...@@ -22,20 +22,23 @@ import "components/arc/mojom/protected_buffer_manager.mojom";
// Next Method ID: 2 // Next Method ID: 2
interface CdmFactory { interface CdmFactory {
// Deprecated, do not use. // Deprecated, do not use.
CreateCdmDeprecated@0(
pending_associated_remote<ContentDecryptionModuleClient> client,
pending_associated_remote<CdmStorage> storage,
pending_associated_receiver<ContentDecryptionModule> cdm);
// Creates a new ContentDecryptionModule instance with the corresponding
// client, remote storage implementation and output protection. Use an
// associated interface to ensure ordering and that all become invalidated at
// the same time.
[MinVersion=1] [MinVersion=1]
CreateCdm@1(pending_associated_remote<ContentDecryptionModuleClient> client, CreateCdmDeprecated@1(
pending_associated_remote<ContentDecryptionModuleClient> client,
pending_associated_remote<CdmStorage> storage, pending_associated_remote<CdmStorage> storage,
pending_associated_receiver<ContentDecryptionModule> cdm, pending_associated_receiver<ContentDecryptionModule> cdm,
pending_remote<OutputProtection> output_protection); pending_remote<OutputProtection> output_protection);
// Creates a new ContentDecryptionModule instance for a |host| with the
// corresponding |client|, remote |storage| implementation and
// |output_protection|. Use an associated interface to ensure ordering and
// that all become invalidated at the same time.
[MinVersion=3]
CreateCdm@2(pending_associated_remote<ContentDecryptionModuleClient> client,
pending_associated_remote<CdmStorage> storage,
pending_remote<OutputProtection> output_protection,
string host,
pending_associated_receiver<ContentDecryptionModule> cdm);
}; };
// Next Method ID: 5 // Next Method ID: 5
......
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