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