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 "modules/EventTargetModules.h" | 8 #include "modules/EventTargetModules.h" |
9 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
10 #include "platform/graphics/media/MediaPlayer.h" | 10 #include "platform/graphics/media/MediaPlayer.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 static void webkitCancelKeyRequest(HTMLMediaElement&, const String& keySyste
m, const String& sessionId, ExceptionState&); | 32 static void webkitCancelKeyRequest(HTMLMediaElement&, const String& keySyste
m, const String& sessionId, ExceptionState&); |
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(needkey); | 42 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); |
43 | 43 |
44 static void keyAdded(HTMLMediaElement&, const String& keySystem, const Strin
g& sessionId); | 44 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
); | 45 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); | 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 keyNeeded(HTMLMediaElement&, const String& contentType, const un
signed char* initData, unsigned initDataLength); | 47 static void encrypted(HTMLMediaElement&, const String& initDataType, const u
nsigned char* initData, unsigned initDataLength); |
48 static void playerDestroyed(HTMLMediaElement&); | 48 static void playerDestroyed(HTMLMediaElement&); |
49 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); | 49 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); |
50 | 50 |
51 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); | 51 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); |
52 static const char* supplementName(); | 52 static const char* supplementName(); |
53 | 53 |
54 virtual void trace(Visitor*) override; | 54 virtual void trace(Visitor*) override; |
55 | 55 |
56 private: | 56 private: |
57 friend class SetMediaKeysHandler; | 57 friend class SetMediaKeysHandler; |
(...skipping 20 matching lines...) Expand all Loading... |
78 WebContentDecryptionModule* contentDecryptionModule(); | 78 WebContentDecryptionModule* contentDecryptionModule(); |
79 | 79 |
80 EmeMode m_emeMode; | 80 EmeMode m_emeMode; |
81 | 81 |
82 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 82 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
86 | 86 |
87 #endif | 87 #endif |
OLD | NEW |