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/media/mojo/clients | |
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/media/mojo/clients')
-rw-r--r-- | chromium/media/mojo/clients/BUILD.gn | 2 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_cdm.cc | 8 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_cdm.h | 6 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_cdm_factory.cc | 14 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_cdm_factory.h | 1 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_cdm_unittest.cc | 8 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_renderer.cc | 1 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_renderer_unittest.cc | 2 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_renderer_wrapper.cc | 10 | ||||
-rw-r--r-- | chromium/media/mojo/clients/mojo_renderer_wrapper.h | 6 |
10 files changed, 17 insertions, 41 deletions
diff --git a/chromium/media/mojo/clients/BUILD.gn b/chromium/media/mojo/clients/BUILD.gn index 68fd43a30e6..6f470bae8ab 100644 --- a/chromium/media/mojo/clients/BUILD.gn +++ b/chromium/media/mojo/clients/BUILD.gn @@ -27,6 +27,8 @@ jumbo_source_set("clients") { # TODO(liberato): can we avoid this? "//content/test/*", + + "//third_party/blink/renderer/modules/webcodecs", ] sources = [ diff --git a/chromium/media/mojo/clients/mojo_cdm.cc b/chromium/media/mojo/clients/mojo_cdm.cc index acc9d1ca9de..df477ee2584 100644 --- a/chromium/media/mojo/clients/mojo_cdm.cc +++ b/chromium/media/mojo/clients/mojo_cdm.cc @@ -23,7 +23,6 @@ #include "media/mojo/mojom/decryptor.mojom.h" #include "services/service_manager/public/cpp/connect.h" #include "services/service_manager/public/mojom/interface_provider.mojom.h" -#include "url/origin.h" namespace media { @@ -39,7 +38,6 @@ void RecordConnectionError(bool connection_error_happened) { // static void MojoCdm::Create( const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm, const SessionMessageCB& session_message_cb, @@ -55,8 +53,7 @@ void MojoCdm::Create( auto promise = std::make_unique<CdmInitializedPromise>( std::move(cdm_created_cb), mojo_cdm); - mojo_cdm->InitializeCdm(key_system, security_origin, cdm_config, - std::move(promise)); + mojo_cdm->InitializeCdm(key_system, cdm_config, std::move(promise)); } MojoCdm::MojoCdm(mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm, @@ -103,7 +100,6 @@ MojoCdm::~MojoCdm() { // error handler can't be invoked and callbacks won't be dispatched. void MojoCdm::InitializeCdm(const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, std::unique_ptr<CdmInitializedPromise> promise) { DVLOG(1) << __func__ << ": " << key_system; @@ -127,7 +123,7 @@ void MojoCdm::InitializeCdm(const std::string& key_system, pending_init_promise_ = std::move(promise); remote_cdm_->Initialize( - key_system, security_origin, cdm_config, + key_system, cdm_config, base::BindOnce(&MojoCdm::OnCdmInitialized, base::Unretained(this))); } diff --git a/chromium/media/mojo/clients/mojo_cdm.h b/chromium/media/mojo/clients/mojo_cdm.h index 45f0fcb09f1..bee79ff2cf1 100644 --- a/chromium/media/mojo/clients/mojo_cdm.h +++ b/chromium/media/mojo/clients/mojo_cdm.h @@ -29,10 +29,6 @@ namespace base { class SingleThreadTaskRunner; } -namespace url { -class Origin; -} - namespace media { class MojoDecryptor; @@ -48,7 +44,6 @@ class MojoCdm : public ContentDecryptionModule, static void Create( const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, mojo::PendingRemote<mojom::ContentDecryptionModule> remote_cdm, const SessionMessageCB& session_message_cb, @@ -94,7 +89,6 @@ class MojoCdm : public ContentDecryptionModule, ~MojoCdm() final; void InitializeCdm(const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, std::unique_ptr<CdmInitializedPromise> promise); diff --git a/chromium/media/mojo/clients/mojo_cdm_factory.cc b/chromium/media/mojo/clients/mojo_cdm_factory.cc index d606e735eb1..2d04068fb22 100644 --- a/chromium/media/mojo/clients/mojo_cdm_factory.cc +++ b/chromium/media/mojo/clients/mojo_cdm_factory.cc @@ -15,7 +15,6 @@ #include "media/mojo/clients/mojo_cdm.h" #include "media/mojo/mojom/interface_factory.mojom.h" #include "mojo/public/cpp/bindings/interface_request.h" -#include "url/origin.h" namespace media { @@ -29,7 +28,6 @@ MojoCdmFactory::~MojoCdmFactory() = default; void MojoCdmFactory::Create( const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, @@ -38,13 +36,6 @@ void MojoCdmFactory::Create( CdmCreatedCB cdm_created_cb) { DVLOG(2) << __func__ << ": " << key_system; - if (security_origin.opaque()) { - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::BindOnce(std::move(cdm_created_cb), nullptr, "Invalid origin.")); - return; - } - // If AesDecryptor can be used, always use it here in the local process. // Note: We should not run AesDecryptor in the browser process except for // testing. See http://crbug.com/441957. @@ -63,9 +54,8 @@ void MojoCdmFactory::Create( interface_factory_->CreateCdm( key_system, cdm_pending_remote.InitWithNewPipeAndPassReceiver()); - MojoCdm::Create(key_system, security_origin, cdm_config, - std::move(cdm_pending_remote), session_message_cb, - session_closed_cb, session_keys_change_cb, + MojoCdm::Create(key_system, cdm_config, std::move(cdm_pending_remote), + session_message_cb, session_closed_cb, session_keys_change_cb, session_expiration_update_cb, std::move(cdm_created_cb)); } diff --git a/chromium/media/mojo/clients/mojo_cdm_factory.h b/chromium/media/mojo/clients/mojo_cdm_factory.h index c3b8d055428..0d987bc51dd 100644 --- a/chromium/media/mojo/clients/mojo_cdm_factory.h +++ b/chromium/media/mojo/clients/mojo_cdm_factory.h @@ -21,7 +21,6 @@ class MojoCdmFactory : public CdmFactory { // CdmFactory implementation. void Create(const std::string& key_system, - const url::Origin& security_origin, const CdmConfig& cdm_config, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, diff --git a/chromium/media/mojo/clients/mojo_cdm_unittest.cc b/chromium/media/mojo/clients/mojo_cdm_unittest.cc index f7b402b4f54..99fd9646162 100644 --- a/chromium/media/mojo/clients/mojo_cdm_unittest.cc +++ b/chromium/media/mojo/clients/mojo_cdm_unittest.cc @@ -24,7 +24,6 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" -#include "url/origin.h" using ::testing::_; using ::testing::DoAll; @@ -48,7 +47,6 @@ namespace media { namespace { const char kClearKeyKeySystem[] = "org.w3.clearkey"; -const char kTestSecurityOrigin[] = "https://www.test.com"; // Random key ID used to create a session. const uint8_t kKeyId[] = { @@ -97,8 +95,8 @@ class MojoCdmTest : public ::testing::Test { } } - MojoCdm::Create(key_system, url::Origin::Create(GURL(kTestSecurityOrigin)), - CdmConfig(), cdm_receiver_.BindNewPipeAndPassRemote(), + MojoCdm::Create(key_system, CdmConfig(), + cdm_receiver_.BindNewPipeAndPassRemote(), base::Bind(&MockCdmClient::OnSessionMessage, base::Unretained(&cdm_client_)), base::Bind(&MockCdmClient::OnSessionClosed, @@ -125,8 +123,6 @@ class MojoCdmTest : public ::testing::Test { mojo_cdm_ = cdm; remote_cdm_ = cdm_factory_.GetCreatedCdm(); EXPECT_EQ(kClearKeyKeySystem, remote_cdm_->GetKeySystem()); - EXPECT_EQ(kTestSecurityOrigin, - remote_cdm_->GetSecurityOrigin().Serialize()); } void ForceConnectionError() { diff --git a/chromium/media/mojo/clients/mojo_renderer.cc b/chromium/media/mojo/clients/mojo_renderer.cc index b6d1a3d7777..aa60a7d2a76 100644 --- a/chromium/media/mojo/clients/mojo_renderer.cc +++ b/chromium/media/mojo/clients/mojo_renderer.cc @@ -10,6 +10,7 @@ #include "base/callback_helpers.h" #include "base/location.h" #include "base/single_thread_task_runner.h" +#include "media/base/cdm_context.h" #include "media/base/media_resource.h" #include "media/base/pipeline_status.h" #include "media/base/renderer_client.h" diff --git a/chromium/media/mojo/clients/mojo_renderer_unittest.cc b/chromium/media/mojo/clients/mojo_renderer_unittest.cc index 5925bc6aa88..f59e1be83bd 100644 --- a/chromium/media/mojo/clients/mojo_renderer_unittest.cc +++ b/chromium/media/mojo/clients/mojo_renderer_unittest.cc @@ -33,7 +33,6 @@ #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" -#include "url/origin.h" using ::base::test::RunCallback; using ::base::test::RunOnceCallback; @@ -184,7 +183,6 @@ class MojoRendererTest : public ::testing::Test { void CreateCdm() { cdm_receiver_.Bind(cdm_remote_.BindNewPipeAndPassReceiver()); cdm_remote_->Initialize(kClearKeyKeySystem, - url::Origin::Create(GURL("https://www.test.com")), CdmConfig(), base::BindOnce(&MojoRendererTest::OnCdmCreated, base::Unretained(this))); diff --git a/chromium/media/mojo/clients/mojo_renderer_wrapper.cc b/chromium/media/mojo/clients/mojo_renderer_wrapper.cc index f23fade4203..2971244b9fa 100644 --- a/chromium/media/mojo/clients/mojo_renderer_wrapper.cc +++ b/chromium/media/mojo/clients/mojo_renderer_wrapper.cc @@ -14,9 +14,9 @@ MojoRendererWrapper::MojoRendererWrapper( MojoRendererWrapper::~MojoRendererWrapper() = default; -void MojoRendererWrapper::Initialize(media::MediaResource* media_resource, - media::RendererClient* client, - media::PipelineStatusCallback init_cb) { +void MojoRendererWrapper::Initialize(MediaResource* media_resource, + RendererClient* client, + PipelineStatusCallback init_cb) { mojo_renderer_->Initialize(media_resource, client, std::move(init_cb)); } @@ -36,8 +36,8 @@ void MojoRendererWrapper::SetVolume(float volume) { mojo_renderer_->SetVolume(volume); } -void MojoRendererWrapper::SetCdm(media::CdmContext* cdm_context, - media::CdmAttachedCB cdm_attached_cb) { +void MojoRendererWrapper::SetCdm(CdmContext* cdm_context, + CdmAttachedCB cdm_attached_cb) { mojo_renderer_->SetCdm(cdm_context, std::move(cdm_attached_cb)); } diff --git a/chromium/media/mojo/clients/mojo_renderer_wrapper.h b/chromium/media/mojo/clients/mojo_renderer_wrapper.h index 552a8f0513f..891b4ff0de7 100644 --- a/chromium/media/mojo/clients/mojo_renderer_wrapper.h +++ b/chromium/media/mojo/clients/mojo_renderer_wrapper.h @@ -13,8 +13,8 @@ namespace media { // Simple wrapper around a MojoRenderer. -// Provides a default behavior for forwarding all media::Renderer calls to a -// media::Renderer instance in a different process, through |mojo_renderer_|. +// Provides a default behavior for forwarding all Renderer calls to a +// Renderer instance in a different process, through |mojo_renderer_|. // Used as a base class to reduce boiler plate code for derived types, which can // override only the methods they need to specialize. class MojoRendererWrapper : public Renderer { @@ -24,7 +24,7 @@ class MojoRendererWrapper : public Renderer { // Renderer implementation. void Initialize(MediaResource* media_resource, - media::RendererClient* client, + RendererClient* client, PipelineStatusCallback init_cb) override; void SetCdm(CdmContext* cdm_context, CdmAttachedCB cdm_attached_cb) override; void SetLatencyHint(base::Optional<base::TimeDelta> latency_hint) override; |