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

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: rebase Created 6 years, 2 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 47e116b44549f820ed887781f235499edec8ed00..b1f525d91883e42bea06f261a5345266a54dc5aa 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
« no previous file with comments | « LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html ('k') | Source/modules/encryptedmedia/MediaKeys.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698