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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 private: | 63 private: |
64 friend class SetMediaKeysHandler; | 64 friend class SetMediaKeysHandler; |
65 | 65 |
66 HTMLMediaElementEncryptedMedia(HTMLMediaElement&); | 66 HTMLMediaElementEncryptedMedia(HTMLMediaElement&); |
67 void generateKeyRequest(WebMediaPlayer*, const String& keySystem, PassRefPtr
<DOMUint8Array> initData, ExceptionState&); | 67 void generateKeyRequest(WebMediaPlayer*, const String& keySystem, PassRefPtr
<DOMUint8Array> initData, ExceptionState&); |
68 void addKey(WebMediaPlayer*, const String& keySystem, PassRefPtr<DOMUint8Arr
ay> key, PassRefPtr<DOMUint8Array> initData, const String& sessionId, ExceptionS
tate&); | 68 void addKey(WebMediaPlayer*, const String& keySystem, PassRefPtr<DOMUint8Arr
ay> key, PassRefPtr<DOMUint8Array> initData, const String& sessionId, ExceptionS
tate&); |
69 void cancelKeyRequest(WebMediaPlayer*, const String& keySystem, const String
& sessionId, ExceptionState&); | 69 void cancelKeyRequest(WebMediaPlayer*, const String& keySystem, const String
& sessionId, ExceptionState&); |
70 | 70 |
71 // EventTarget | 71 // EventTarget |
72 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); | 72 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtrWill
BeRawPtr<EventListener>); |
73 EventListener* getAttributeEventListener(const AtomicString& eventType); | 73 EventListener* getAttributeEventListener(const AtomicString& eventType); |
74 | 74 |
75 // Currently we have both EME v0.1b and EME WD implemented in media element. | 75 // Currently we have both EME v0.1b and EME WD implemented in media element. |
76 // But we do not want to support both at the same time. The one used first | 76 // But we do not want to support both at the same time. The one used first |
77 // will be supported. Use |m_emeMode| to track this selection. | 77 // will be supported. Use |m_emeMode| to track this selection. |
78 // FIXME: Remove EmeMode once EME v0.1b support is removed. See crbug.com/24
9976. | 78 // FIXME: Remove EmeMode once EME v0.1b support is removed. See crbug.com/24
9976. |
79 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; | 79 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; |
80 | 80 |
81 // check (and set if necessary) the encrypted media extensions (EME) mode | 81 // check (and set if necessary) the encrypted media extensions (EME) mode |
82 // (v0.1b or WD). Returns whether the mode is allowed and successfully set. | 82 // (v0.1b or WD). Returns whether the mode is allowed and successfully set. |
83 bool setEmeMode(EmeMode); | 83 bool setEmeMode(EmeMode); |
84 | 84 |
85 HTMLMediaElement& m_mediaElement; | 85 HTMLMediaElement& m_mediaElement; |
86 EmeMode m_emeMode; | 86 EmeMode m_emeMode; |
87 | 87 |
88 bool m_isWaitingForKey; | 88 bool m_isWaitingForKey; |
89 | 89 |
90 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 90 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
94 | 94 |
95 #endif | 95 #endif |
OLD | NEW |