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

Side by Side Diff: Source/modules/encryptedmedia/MediaKeySession.h

Issue 379343003: Set callback interface on WebCDMSession after creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on promises Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // ActiveDOMObject 87 // ActiveDOMObject
88 virtual bool hasPendingActivity() const OVERRIDE; 88 virtual bool hasPendingActivity() const OVERRIDE;
89 virtual void stop() OVERRIDE; 89 virtual void stop() OVERRIDE;
90 90
91 virtual void trace(Visitor*) OVERRIDE; 91 virtual void trace(Visitor*) OVERRIDE;
92 92
93 private: 93 private:
94 class PendingAction; 94 class PendingAction;
95 friend class MediaKeySessionInitializer; 95 friend class MediaKeySessionInitializer;
96 96
97 MediaKeySession(ExecutionContext*, MediaKeys*); 97 MediaKeySession(ExecutionContext*, MediaKeys*, PassOwnPtr<blink::WebContentD ecryptionModuleSession>);
98 void actionTimerFired(Timer<MediaKeySession>*); 98 void actionTimerFired(Timer<MediaKeySession>*);
99 void finishInitialization(PassOwnPtr<blink::WebContentDecryptionModuleSessio n>);
100 99
101 // blink::WebContentDecryptionModuleSession::Client 100 // blink::WebContentDecryptionModuleSession::Client
102 virtual void message(const unsigned char* message, size_t messageLength, con st blink::WebURL& destinationURL) OVERRIDE; 101 virtual void message(const unsigned char* message, size_t messageLength, con st blink::WebURL& destinationURL) OVERRIDE;
103 virtual void ready() OVERRIDE; 102 virtual void ready() OVERRIDE;
104 virtual void close() OVERRIDE; 103 virtual void close() OVERRIDE;
105 virtual void error(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; 104 virtual void error(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE;
106 virtual void error(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString& errorMessage) OVERRIDE; 105 virtual void error(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString& errorMessage) OVERRIDE;
107 106
108 String m_keySystem; 107 String m_keySystem;
109 RefPtrWillBeMember<MediaKeyError> m_error; 108 RefPtrWillBeMember<MediaKeyError> m_error;
110 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; 109 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue;
111 OwnPtr<blink::WebContentDecryptionModuleSession> m_session; 110 OwnPtr<blink::WebContentDecryptionModuleSession> m_session;
112 111
113 // Used to determine if MediaKeys is still active. 112 // Used to determine if MediaKeys is still active.
114 WeakMember<MediaKeys> m_keys; 113 WeakMember<MediaKeys> m_keys;
115 114
116 // Is the CDM finished with this session? 115 // Is the CDM finished with this session?
117 bool m_isClosed; 116 bool m_isClosed;
118 117
119 HeapDeque<Member<PendingAction> > m_pendingActions; 118 HeapDeque<Member<PendingAction> > m_pendingActions;
120 Timer<MediaKeySession> m_actionTimer; 119 Timer<MediaKeySession> m_actionTimer;
121 }; 120 };
122 121
123 } 122 }
124 123
125 #endif // MediaKeySession_h 124 #endif // MediaKeySession_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/encryptedmedia/MediaKeySession.cpp » ('j') | Source/modules/encryptedmedia/MediaKeySession.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698