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" |
11 #include "platform/Supplementable.h" | 11 #include "platform/Supplementable.h" |
12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 13 #include "public/platform/WebEncryptedMediaTypes.h" |
13 #include "public/platform/WebMediaPlayerClient.h" | 14 #include "public/platform/WebMediaPlayerClient.h" |
14 | 15 |
15 namespace blink { | 16 namespace blink { |
16 | 17 |
17 class ExceptionState; | 18 class ExceptionState; |
18 class HTMLMediaElement; | 19 class HTMLMediaElement; |
19 class MediaKeys; | 20 class MediaKeys; |
20 class ScriptPromise; | 21 class ScriptPromise; |
21 class ScriptState; | 22 class ScriptState; |
22 | 23 |
(...skipping 14 matching lines...) Expand all Loading... |
37 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); | 38 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); |
38 | 39 |
39 // encrypted media extensions (WD) | 40 // encrypted media extensions (WD) |
40 static MediaKeys* mediaKeys(HTMLMediaElement&); | 41 static MediaKeys* mediaKeys(HTMLMediaElement&); |
41 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys
*); | 42 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys
*); |
42 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); | 43 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); |
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&, WebEncryptedMediaInitDataType, cons
t unsigned char* initData, unsigned initDataLength); |
48 static void didBlockPlaybackWaitingForKey(HTMLMediaElement&); | 49 static void didBlockPlaybackWaitingForKey(HTMLMediaElement&); |
49 static void didResumePlaybackBlockedForKey(HTMLMediaElement&); | 50 static void didResumePlaybackBlockedForKey(HTMLMediaElement&); |
50 static void playerDestroyed(HTMLMediaElement&); | 51 static void playerDestroyed(HTMLMediaElement&); |
51 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); | 52 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); |
52 | 53 |
53 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); | 54 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); |
54 static const char* supplementName(); | 55 static const char* supplementName(); |
55 | 56 |
56 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
57 | 58 |
(...skipping 24 matching lines...) Expand all Loading... |
82 EmeMode m_emeMode; | 83 EmeMode m_emeMode; |
83 | 84 |
84 bool m_isWaitingForKey; | 85 bool m_isWaitingForKey; |
85 | 86 |
86 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 87 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
87 }; | 88 }; |
88 | 89 |
89 } // namespace blink | 90 } // namespace blink |
90 | 91 |
91 #endif | 92 #endif |
OLD | NEW |