| 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 12 matching lines...) Expand all Loading... |
| 23 class ScriptState; | 23 class ScriptState; |
| 24 class WebContentDecryptionModule; | 24 class WebContentDecryptionModule; |
| 25 class WebMediaPlayer; | 25 class WebMediaPlayer; |
| 26 | 26 |
| 27 class MODULES_EXPORT HTMLMediaElementEncryptedMedia final : public GarbageCollec
tedFinalized<HTMLMediaElementEncryptedMedia>, public Supplement<HTMLMediaElement
>, public WebMediaPlayerEncryptedMediaClient { | 27 class MODULES_EXPORT HTMLMediaElementEncryptedMedia final : public GarbageCollec
tedFinalized<HTMLMediaElementEncryptedMedia>, public Supplement<HTMLMediaElement
>, public WebMediaPlayerEncryptedMediaClient { |
| 28 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementEncryptedMedia); | 28 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementEncryptedMedia); |
| 29 public: | 29 public: |
| 30 static MediaKeys* mediaKeys(HTMLMediaElement&); | 30 static MediaKeys* mediaKeys(HTMLMediaElement&); |
| 31 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys
*); | 31 static ScriptPromise setMediaKeys(ScriptState*, HTMLMediaElement&, MediaKeys
*); |
| 32 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); | 32 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(encrypted); |
| 33 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(waitingforkey); |
| 33 | 34 |
| 34 // WebMediaPlayerEncryptedMediaClient methods | 35 // WebMediaPlayerEncryptedMediaClient methods |
| 35 void encrypted(WebEncryptedMediaInitDataType, const unsigned char* initData,
unsigned initDataLength) final; | 36 void encrypted(WebEncryptedMediaInitDataType, const unsigned char* initData,
unsigned initDataLength) final; |
| 36 void didBlockPlaybackWaitingForKey() final; | 37 void didBlockPlaybackWaitingForKey() final; |
| 37 void didResumePlaybackBlockedForKey() final; | 38 void didResumePlaybackBlockedForKey() final; |
| 38 WebContentDecryptionModule* contentDecryptionModule(); | 39 WebContentDecryptionModule* contentDecryptionModule(); |
| 39 | 40 |
| 40 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); | 41 static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); |
| 41 static const char* supplementName(); | 42 static const char* supplementName(); |
| 42 | 43 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 62 // - attaching media keys, which shall have a boolean value | 63 // - attaching media keys, which shall have a boolean value |
| 63 bool m_isWaitingForKey; | 64 bool m_isWaitingForKey; |
| 64 bool m_isAttachingMediaKeys; | 65 bool m_isAttachingMediaKeys; |
| 65 | 66 |
| 66 Member<MediaKeys> m_mediaKeys; | 67 Member<MediaKeys> m_mediaKeys; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace blink | 70 } // namespace blink |
| 70 | 71 |
| 71 #endif | 72 #endif |
| OLD | NEW |