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

Unified Diff: Source/modules/encryptedmedia/MediaKeys.h

Issue 563083002: Implement MediaKeys.setServerCertificate() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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: Source/modules/encryptedmedia/MediaKeys.h
diff --git a/Source/modules/encryptedmedia/MediaKeys.h b/Source/modules/encryptedmedia/MediaKeys.h
index e31233128d3703d29eff9cb56a8b688d27a658b0..b698b2a6f3271cf8c126db75044830835094c181 100644
--- a/Source/modules/encryptedmedia/MediaKeys.h
+++ b/Source/modules/encryptedmedia/MediaKeys.h
@@ -29,6 +29,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ContextLifecycleObserver.h"
+#include "platform/Timer.h"
#include "wtf/Forward.h"
#include "wtf/text/WTFString.h"
@@ -53,6 +54,9 @@ public:
MediaKeySession* createSession(ScriptState*, const String& sessionType);
+ ScriptPromise setServerCertificate(ScriptState*, ArrayBuffer* serverCertificate);
+ ScriptPromise setServerCertificate(ScriptState*, ArrayBufferView* serverCertificate);
+
static bool isTypeSupported(const String& keySystem, const String& contentType);
blink::WebContentDecryptionModule* contentDecryptionModule();
@@ -63,11 +67,19 @@ public:
virtual void contextDestroyed() OVERRIDE;
private:
+ class PendingAction;
friend class MediaKeysInitializer;
MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<blink::WebContentDecryptionModule>);
+ ScriptPromise setServerCertificateInternal(ScriptState*, PassRefPtr<ArrayBuffer> initData);
+
+ void timerFired(Timer<MediaKeys>*);
+
const String m_keySystem;
OwnPtr<blink::WebContentDecryptionModule> m_cdm;
+
+ HeapDeque<Member<PendingAction> > m_pendingActions;
+ Timer<MediaKeys> m_timer;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698