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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
7 | 7 |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "core/dom/ExceptionCode.h" | 9 #include "core/dom/ExceptionCode.h" |
10 #include "core/html/HTMLMediaElement.h" | 10 #include "core/html/HTMLMediaElement.h" |
11 #include "core/html/MediaKeyError.h" | 11 #include "core/html/MediaKeyError.h" |
12 #include "core/html/MediaKeyEvent.h" | 12 #include "core/html/MediaKeyEvent.h" |
13 #include "modules/encryptedmedia/MediaKeyNeededEvent.h" | 13 #include "modules/encryptedmedia/MediaKeyNeededEvent.h" |
14 #include "modules/encryptedmedia/MediaKeys.h" | 14 #include "modules/encryptedmedia/MediaKeys.h" |
15 #include "platform/Logging.h" | 15 #include "platform/Logging.h" |
16 #include "platform/RuntimeEnabledFeatures.h" | 16 #include "platform/RuntimeEnabledFeatures.h" |
17 #include "wtf/Uint8Array.h" | 17 #include "wtf/Uint8Array.h" |
18 | 18 |
19 namespace WebCore { | 19 namespace blink { |
20 | 20 |
21 static void throwExceptionIfMediaKeyExceptionOccurred(const String& keySystem, c
onst String& sessionId, blink::WebMediaPlayer::MediaKeyException exception, Exce
ptionState& exceptionState) | 21 static void throwExceptionIfMediaKeyExceptionOccurred(const String& keySystem, c
onst String& sessionId, blink::WebMediaPlayer::MediaKeyException exception, Exce
ptionState& exceptionState) |
22 { | 22 { |
23 switch (exception) { | 23 switch (exception) { |
24 case blink::WebMediaPlayer::MediaKeyExceptionNoError: | 24 case blink::WebMediaPlayer::MediaKeyExceptionNoError: |
25 return; | 25 return; |
26 case blink::WebMediaPlayer::MediaKeyExceptionInvalidPlayerState: | 26 case blink::WebMediaPlayer::MediaKeyExceptionInvalidPlayerState: |
27 exceptionState.throwDOMException(InvalidStateError, "The player is in an
invalid state."); | 27 exceptionState.throwDOMException(InvalidStateError, "The player is in an
invalid state."); |
28 return; | 28 return; |
29 case blink::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported: | 29 case blink::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported: |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia
::from(element); | 349 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia
::from(element); |
350 return thisElement.contentDecryptionModule(); | 350 return thisElement.contentDecryptionModule(); |
351 } | 351 } |
352 | 352 |
353 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) | 353 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) |
354 { | 354 { |
355 visitor->trace(m_mediaKeys); | 355 visitor->trace(m_mediaKeys); |
356 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); | 356 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); |
357 } | 357 } |
358 | 358 |
359 } // namespace WebCore | 359 } // namespace blink |
OLD | NEW |