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

Unified Diff: content/renderer/media/webcontentdecryptionmodule_impl.h

Issue 555223004: Update MediaKeys interface for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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: 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);
};

Powered by Google App Engine
This is Rietveld 408576698