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

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

Issue 132823005: Schedule session initialization in MediaKeys. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@rename_close_gkr
Patch Set: comments addressed Created 6 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: Source/modules/encryptedmedia/MediaKeySession.h
diff --git a/Source/modules/encryptedmedia/MediaKeySession.h b/Source/modules/encryptedmedia/MediaKeySession.h
index 45072199301fd42012c494d5aba33a931f055356..64310d7cf0e25d53734fb934cb9385421404a836 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.h
+++ b/Source/modules/encryptedmedia/MediaKeySession.h
@@ -64,7 +64,7 @@ public:
void setError(MediaKeyError*);
MediaKeyError* error() { return m_error.get(); }
- void initializeNewSession(const String& mimeType, Uint8Array* initData);
+ void initializeNewSession(const String& mimeType, const Uint8Array& initData);
void update(Uint8Array* response, ExceptionState&);
void release(ExceptionState&);
@@ -79,7 +79,6 @@ public:
private:
MediaKeySession(ExecutionContext*, ContentDecryptionModule*, MediaKeys*);
- void initializeNewSessionTimerFired(Timer<MediaKeySession>*);
void updateTimerFired(Timer<MediaKeySession>*);
// ContentDecryptionModuleSessionClient
@@ -94,17 +93,7 @@ private:
// Used to remove the reference from the parent MediaKeys when close()'d.
MediaKeys* m_keys;
- // FIXME: Check whether |initData| can be changed by JS. Maybe we should not pass it as a pointer.
- // FIXME: Move the queue and timer to MediaKeys.
- struct InitializeNewSessionData {
- InitializeNewSessionData(const String& mimeType, Uint8Array* initData) : mimeType(mimeType), initData(initData) { }
- String mimeType;
- RefPtr<Uint8Array> initData;
- };
- Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData;
- Timer<MediaKeySession> m_initializeNewSessionTimer;
-
- Deque<RefPtr<Uint8Array> > m_pendingKeys;
+ Deque<RefPtr<Uint8Array> > m_pendingUpdates;
Timer<MediaKeySession> m_updateTimer;
};

Powered by Google App Engine
This is Rietveld 408576698