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 22 matching lines...) Expand all Loading... | |
33 | 33 |
34 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeyadded); | 34 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeyadded); |
35 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror); | 35 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror); |
36 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage); | 36 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage); |
37 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); | 37 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); |
38 | 38 |
39 // encrypted media extensions (WD) | 39 // encrypted media extensions (WD) |
40 static MediaKeys* mediaKeys(HTMLMediaElement&); | 40 static MediaKeys* mediaKeys(HTMLMediaElement&); |
41 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys *); | 41 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys *); |
42 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); | 42 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); |
43 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(waitingforkey); | |
ddorwin
2015/02/20 04:45:28
There isn't an attribute for this event.
jrummell
2015/02/20 17:45:06
Done.
| |
43 | 44 |
44 static void keyAdded(HTMLMediaElement&, const String& keySystem, const Strin g& sessionId); | 45 static void keyAdded(HTMLMediaElement&, const String& keySystem, const Strin g& sessionId); |
45 static void keyError(HTMLMediaElement&, const String& keySystem, const Strin g& sessionId, WebMediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode ); | 46 static void keyError(HTMLMediaElement&, const String& keySystem, const Strin g& sessionId, WebMediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode ); |
46 static void keyMessage(HTMLMediaElement&, const String& keySystem, const Str ing& sessionId, const unsigned char* message, unsigned messageLength, const WebU RL& defaultURL); | 47 static void keyMessage(HTMLMediaElement&, const String& keySystem, const Str ing& sessionId, const unsigned char* message, unsigned messageLength, const WebU RL& defaultURL); |
47 static void encrypted(HTMLMediaElement&, const String& initDataType, const u nsigned char* initData, unsigned initDataLength); | 48 static void encrypted(HTMLMediaElement&, const String& initDataType, const u nsigned char* initData, unsigned initDataLength); |
49 static void waitingForKey(HTMLMediaElement&); | |
50 static void playbackResumedAfterKey(HTMLMediaElement&); | |
ddorwin
2015/02/20 04:45:28
"AfterKey" sounds weird.
noLongerWaitingForKey?
jrummell
2015/02/20 17:45:06
Done.
| |
48 static void playerDestroyed(HTMLMediaElement&); | 51 static void playerDestroyed(HTMLMediaElement&); |
49 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement& ); | 52 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement& ); |
50 | 53 |
51 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); | 54 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); |
52 static const char* supplementName(); | 55 static const char* supplementName(); |
53 | 56 |
54 virtual void trace(Visitor*) override; | 57 virtual void trace(Visitor*) override; |
55 | 58 |
56 private: | 59 private: |
57 friend class SetMediaKeysHandler; | 60 friend class SetMediaKeysHandler; |
(...skipping 14 matching lines...) Expand all Loading... | |
72 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; | 75 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; |
73 | 76 |
74 // check (and set if necessary) the encrypted media extensions (EME) mode | 77 // check (and set if necessary) the encrypted media extensions (EME) mode |
75 // (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. |
76 bool setEmeMode(EmeMode); | 79 bool setEmeMode(EmeMode); |
77 | 80 |
78 WebContentDecryptionModule* contentDecryptionModule(); | 81 WebContentDecryptionModule* contentDecryptionModule(); |
79 | 82 |
80 EmeMode m_emeMode; | 83 EmeMode m_emeMode; |
81 | 84 |
85 bool m_waitingForKey; | |
ddorwin
2015/02/20 04:45:28
m_isW...
jrummell
2015/02/20 17:45:05
Done.
| |
86 | |
82 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 87 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
83 }; | 88 }; |
84 | 89 |
85 } // namespace blink | 90 } // namespace blink |
86 | 91 |
87 #endif | 92 #endif |
OLD | NEW |