Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: media/mojo/services/mojo_decryptor_service.h

Issue 2752653002: Change MojoDecryptorService to take a Decryptor (Closed)
Patch Set: comments updated Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/services/mojo_cdm_service.cc ('k') | media/mojo/services/mojo_decryptor_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_decryptor_service.h
diff --git a/media/mojo/services/mojo_decryptor_service.h b/media/mojo/services/mojo_decryptor_service.h
index 13149776313d6193478f9a91cb9be0e0109f62ea..e3f99090fc2fa05c1343847e42182bb58e2821ec 100644
--- a/media/mojo/services/mojo_decryptor_service.h
+++ b/media/mojo/services/mojo_decryptor_service.h
@@ -21,7 +21,6 @@
namespace media {
class DecoderBuffer;
-class ContentDecryptionModule;
class MojoDecoderBufferReader;
class MojoDecoderBufferWriter;
@@ -33,14 +32,10 @@ class MEDIA_MOJO_EXPORT MojoDecryptorService
using StreamType = media::Decryptor::StreamType;
using Status = media::Decryptor::Status;
- // Constructs a MojoDecryptorService and binds it to the |request|. Keeps a
- // copy of |cdm| to prevent it from being deleted as long as it is needed.
+ // Constructs a MojoDecryptorService and binds it to the |request|.
// |error_handler| will be called if a connection error occurs.
- // TODO(jrummell): Ideally this should take a Decryptor instead of |cdm|.
- // The owner of the MojoDecryptorService should control the lifetime of the
- // CDM. Both this and the CDM are owned by MojoCdmService, so it seems
- // possible. http://crbug.com/701107.
- MojoDecryptorService(const scoped_refptr<ContentDecryptionModule>& cdm,
+ // Caller must ensure that |decryptor| outlives |this|.
+ MojoDecryptorService(media::Decryptor* decryptor,
mojo::InterfaceRequest<mojom::Decryptor> request,
const base::Closure& error_handler);
@@ -106,9 +101,6 @@ class MEDIA_MOJO_EXPORT MojoDecryptorService
// Helper class to receive encrypted DecoderBuffer from the client.
std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_;
- // Keep ownership of |cdm_| while it is being used. |decryptor_| is the actual
- // Decryptor referenced by |cdm_|.
- scoped_refptr<ContentDecryptionModule> cdm_;
media::Decryptor* decryptor_;
base::WeakPtr<MojoDecryptorService> weak_this_;
« no previous file with comments | « media/mojo/services/mojo_cdm_service.cc ('k') | media/mojo/services/mojo_decryptor_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698