| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef HTMLMediaElementEncryptedMedia_h | 5 #ifndef HTMLMediaElementEncryptedMedia_h |
| 6 #define HTMLMediaElementEncryptedMedia_h | 6 #define HTMLMediaElementEncryptedMedia_h |
| 7 | 7 |
| 8 #include "core/EventTypeNames.h" | 8 #include "core/EventTypeNames.h" |
| 9 #include "core/dom/DOMTypedArray.h" | 9 #include "core/dom/DOMTypedArray.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 friend class SetMediaKeysHandler; | 60 friend class SetMediaKeysHandler; |
| 61 | 61 |
| 62 HTMLMediaElementEncryptedMedia(); | 62 HTMLMediaElementEncryptedMedia(); |
| 63 void generateKeyRequest(WebMediaPlayer*, const String& keySystem, PassRefPtr
<DOMUint8Array> initData, ExceptionState&); | 63 void generateKeyRequest(WebMediaPlayer*, const String& keySystem, PassRefPtr
<DOMUint8Array> initData, ExceptionState&); |
| 64 void addKey(WebMediaPlayer*, const String& keySystem, PassRefPtr<DOMUint8Arr
ay> key, PassRefPtr<DOMUint8Array> initData, const String& sessionId, ExceptionS
tate&); | 64 void addKey(WebMediaPlayer*, const String& keySystem, PassRefPtr<DOMUint8Arr
ay> key, PassRefPtr<DOMUint8Array> initData, const String& sessionId, ExceptionS
tate&); |
| 65 void cancelKeyRequest(WebMediaPlayer*, const String& keySystem, const String
& sessionId, ExceptionState&); | 65 void cancelKeyRequest(WebMediaPlayer*, const String& keySystem, const String
& sessionId, ExceptionState&); |
| 66 | 66 |
| 67 // EventTarget | 67 // EventTarget |
| 68 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); | 68 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtrWill
BeRawPtr<EventListener>); |
| 69 EventListener* getAttributeEventListener(const AtomicString& eventType); | 69 EventListener* getAttributeEventListener(const AtomicString& eventType); |
| 70 | 70 |
| 71 // Currently we have both EME v0.1b and EME WD implemented in media element. | 71 // Currently we have both EME v0.1b and EME WD implemented in media element. |
| 72 // But we do not want to support both at the same time. The one used first | 72 // But we do not want to support both at the same time. The one used first |
| 73 // will be supported. Use |m_emeMode| to track this selection. | 73 // will be supported. Use |m_emeMode| to track this selection. |
| 74 // FIXME: Remove EmeMode once EME v0.1b support is removed. See crbug.com/24
9976. | 74 // FIXME: Remove EmeMode once EME v0.1b support is removed. See crbug.com/24
9976. |
| 75 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; | 75 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; |
| 76 | 76 |
| 77 // check (and set if necessary) the encrypted media extensions (EME) mode | 77 // check (and set if necessary) the encrypted media extensions (EME) mode |
| 78 // (v0.1b or WD). Returns whether the mode is allowed and successfully set. | 78 // (v0.1b or WD). Returns whether the mode is allowed and successfully set. |
| 79 bool setEmeMode(EmeMode); | 79 bool setEmeMode(EmeMode); |
| 80 | 80 |
| 81 WebContentDecryptionModule* contentDecryptionModule(); | 81 WebContentDecryptionModule* contentDecryptionModule(); |
| 82 | 82 |
| 83 EmeMode m_emeMode; | 83 EmeMode m_emeMode; |
| 84 | 84 |
| 85 bool m_isWaitingForKey; | 85 bool m_isWaitingForKey; |
| 86 | 86 |
| 87 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 87 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| 91 | 91 |
| 92 #endif | 92 #endif |
| OLD | NEW |