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

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

Issue 1407933010: media: Make MediaKeys ref-counted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 1 month 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.cc ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm_service.h
diff --git a/media/mojo/services/mojo_cdm_service.h b/media/mojo/services/mojo_cdm_service.h
index 0f974da1a234ae8581a0acf47fceed9a22d06a0d..c669a74b73b9fd3d4f14da7f374ae8b5164c7e6b 100644
--- a/media/mojo/services/mojo_cdm_service.h
+++ b/media/mojo/services/mojo_cdm_service.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "media/base/media_keys.h"
@@ -76,7 +77,7 @@ class MojoCdmService : public interfaces::ContentDecryptionModule {
private:
// Callback for CdmFactory::Create().
void OnCdmCreated(scoped_ptr<MojoCdmPromise<int>> promise,
- scoped_ptr<MediaKeys> cdm,
+ const scoped_refptr<MediaKeys>& cdm,
const std::string& error_message);
// Callbacks for firing session events.
@@ -105,7 +106,7 @@ class MojoCdmService : public interfaces::ContentDecryptionModule {
mojo::ServiceProvider* service_provider_;
CdmFactory* cdm_factory_;
- scoped_ptr<MediaKeys> cdm_;
+ scoped_refptr<MediaKeys> cdm_;
// Set to a valid CDM ID if the |cdm_| is successfully created.
int cdm_id_;
« no previous file with comments | « media/mojo/services/mojo_cdm.cc ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698