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

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: 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
Index: media/blink/webencryptedmediaclient_impl.h
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h
index d101ecb9549caace1e1b9d4cd28c40519e8c7251..99d02c95f07417adb0d9004481a4581688b90066 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(blink::WebSecurityOrigin security_origin,
+ blink::WebString key_system,
xhwang 2015/02/03 18:45:49 nit: We usually have key system before the securit
jrummell 2015/02/03 20:01:14 Done.
+ 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

Powered by Google App Engine
This is Rietveld 408576698