Index: content/renderer/media/webcontentdecryptionmodule_impl.h |
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h |
index 2619e5610b3eeea3a0ca232bd018536aac3a85e5..da2fa550b1a30350c83007662cc6a98feaead0ed 100644 |
--- a/content/renderer/media/webcontentdecryptionmodule_impl.h |
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.h |
@@ -9,6 +9,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/strings/string16.h" |
#include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" |
@@ -64,12 +65,22 @@ class WebContentDecryptionModuleImpl |
virtual blink::WebContentDecryptionModuleSession* createSession( |
blink::WebContentDecryptionModuleSession::Client* client); |
+ virtual void setServerCertificate( |
+ const uint8* server_certificate, |
+ size_t server_certificate_length, |
+ blink::WebContentDecryptionModuleResult result); |
+ |
private: |
// Takes reference to |adapter|. |
WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); |
scoped_refptr<CdmSessionAdapter> adapter_; |
+ // Since promises will live until they are fired, use a weak reference when |
+ // creating a promise in case this class disappears before the promise |
+ // actually fires. |
+ base::WeakPtrFactory<WebContentDecryptionModuleImpl> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); |
}; |