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 27 matching lines...) Expand all Loading... |
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 | 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 encrypted(HTMLMediaElement&, const String& initDataType, const u
nsigned char* initData, unsigned initDataLength); | 47 static void encrypted(HTMLMediaElement&, const String& initDataType, const u
nsigned char* initData, unsigned initDataLength); |
| 48 static void didBlockPlaybackWaitingForKey(HTMLMediaElement&); |
| 49 static void didResumePlaybackBlockedForKey(HTMLMediaElement&); |
48 static void playerDestroyed(HTMLMediaElement&); | 50 static void playerDestroyed(HTMLMediaElement&); |
49 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); | 51 static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&
); |
50 | 52 |
51 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); | 53 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); |
52 static const char* supplementName(); | 54 static const char* supplementName(); |
53 | 55 |
54 virtual void trace(Visitor*) override; | 56 virtual void trace(Visitor*) override; |
55 | 57 |
56 private: | 58 private: |
57 friend class SetMediaKeysHandler; | 59 friend class SetMediaKeysHandler; |
(...skipping 14 matching lines...) Expand all Loading... |
72 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; | 74 enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed }; |
73 | 75 |
74 // check (and set if necessary) the encrypted media extensions (EME) mode | 76 // 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. | 77 // (v0.1b or WD). Returns whether the mode is allowed and successfully set. |
76 bool setEmeMode(EmeMode); | 78 bool setEmeMode(EmeMode); |
77 | 79 |
78 WebContentDecryptionModule* contentDecryptionModule(); | 80 WebContentDecryptionModule* contentDecryptionModule(); |
79 | 81 |
80 EmeMode m_emeMode; | 82 EmeMode m_emeMode; |
81 | 83 |
| 84 bool m_isWaitingForKey; |
| 85 |
82 PersistentWillBeMember<MediaKeys> m_mediaKeys; | 86 PersistentWillBeMember<MediaKeys> m_mediaKeys; |
83 }; | 87 }; |
84 | 88 |
85 } // namespace blink | 89 } // namespace blink |
86 | 90 |
87 #endif | 91 #endif |
OLD | NEW |