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

Unified Diff: media/blink/webencryptedmediaclient_impl.h

Issue 886393003: Handle createCDM() when frame destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 years, 11 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/blink/webcontentdecryptionmoduleaccess_impl.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webencryptedmediaclient_impl.h
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h
index d101ecb9549caace1e1b9d4cd28c40519e8c7251..7b606dc448477a473de426c833fbce434c04eb27 100644
--- a/media/blink/webencryptedmediaclient_impl.h
+++ b/media/blink/webencryptedmediaclient_impl.h
@@ -9,8 +9,10 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "media/base/cdm_factory.h"
#include "media/base/media_export.h"
+#include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
#include "third_party/WebKit/public/platform/WebEncryptedMediaClient.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
@@ -29,6 +31,12 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
virtual void requestMediaKeySystemAccess(
blink::WebEncryptedMediaRequest request);
+ // Create the CDM for |key_system| and |security_origin|. The caller owns
+ // the created cdm (passed back using |result|).
+ void CreateCdm(const blink::WebString& key_system,
+ const blink::WebSecurityOrigin& security_origin,
+ blink::WebContentDecryptionModuleResult result);
+
private:
// Report usage of key system to UMA. There are 2 different counts logged:
// 1. The key system is requested.
@@ -45,6 +53,8 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
Reporters reporters_;
scoped_ptr<CdmFactory> cdm_factory_;
+
+ base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_;
};
} // namespace media
« no previous file with comments | « media/blink/webcontentdecryptionmoduleaccess_impl.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698