| OLD | NEW |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void stop() override; | 89 void stop() override; |
| 90 | 90 |
| 91 // ActiveScriptWrappable implementation. | 91 // ActiveScriptWrappable implementation. |
| 92 bool hasPendingActivity() const final; | 92 bool hasPendingActivity() const final; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 MediaKeys(ExecutionContext*, const WebVector<WebEncryptedMediaSessionType>&
supportedSessionTypes, std::unique_ptr<WebContentDecryptionModule>); | 95 MediaKeys(ExecutionContext*, const WebVector<WebEncryptedMediaSessionType>&
supportedSessionTypes, std::unique_ptr<WebContentDecryptionModule>); |
| 96 class PendingAction; | 96 class PendingAction; |
| 97 | 97 |
| 98 bool sessionTypeSupported(WebEncryptedMediaSessionType); | 98 bool sessionTypeSupported(WebEncryptedMediaSessionType); |
| 99 void timerFired(Timer<MediaKeys>*); | 99 void timerFired(TimerBase*); |
| 100 | 100 |
| 101 const WebVector<WebEncryptedMediaSessionType> m_supportedSessionTypes; | 101 const WebVector<WebEncryptedMediaSessionType> m_supportedSessionTypes; |
| 102 std::unique_ptr<WebContentDecryptionModule> m_cdm; | 102 std::unique_ptr<WebContentDecryptionModule> m_cdm; |
| 103 | 103 |
| 104 // Keep track of the HTMLMediaElement that references this object. Keeping | 104 // Keep track of the HTMLMediaElement that references this object. Keeping |
| 105 // a WeakMember so that HTMLMediaElement's lifetime isn't dependent on | 105 // a WeakMember so that HTMLMediaElement's lifetime isn't dependent on |
| 106 // this object. | 106 // this object. |
| 107 // Note that the referenced HTMLMediaElement must be destroyed | 107 // Note that the referenced HTMLMediaElement must be destroyed |
| 108 // before this object. This is due to WebMediaPlayerImpl (owned by | 108 // before this object. This is due to WebMediaPlayerImpl (owned by |
| 109 // HTMLMediaElement) possibly having a pointer to Decryptor created | 109 // HTMLMediaElement) possibly having a pointer to Decryptor created |
| 110 // by WebContentDecryptionModuleImpl (owned by this object). | 110 // by WebContentDecryptionModuleImpl (owned by this object). |
| 111 WeakMember<HTMLMediaElement> m_mediaElement; | 111 WeakMember<HTMLMediaElement> m_mediaElement; |
| 112 | 112 |
| 113 // Keep track of whether this object has been reserved by HTMLMediaElement | 113 // Keep track of whether this object has been reserved by HTMLMediaElement |
| 114 // (i.e. a setMediaKeys operation is in progress). Destruction of this | 114 // (i.e. a setMediaKeys operation is in progress). Destruction of this |
| 115 // object will be prevented until the setMediaKeys() completes. | 115 // object will be prevented until the setMediaKeys() completes. |
| 116 bool m_reservedForMediaElement; | 116 bool m_reservedForMediaElement; |
| 117 | 117 |
| 118 HeapDeque<Member<PendingAction>> m_pendingActions; | 118 HeapDeque<Member<PendingAction>> m_pendingActions; |
| 119 Timer<MediaKeys> m_timer; | 119 Timer<MediaKeys> m_timer; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| 123 | 123 |
| 124 #endif // MediaKeys_h | 124 #endif // MediaKeys_h |
| OLD | NEW |