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" | 8 #include "RuntimeEnabledFeatures.h" |
9 #include "bindings/v8/ExceptionState.h" | 9 #include "bindings/v8/ExceptionState.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 exceptionState.throwDOMException(SyntaxError, "The key system provided i
s empty."); | 190 exceptionState.throwDOMException(SyntaxError, "The key system provided i
s empty."); |
191 return; | 191 return; |
192 } | 192 } |
193 | 193 |
194 if (!key) { | 194 if (!key) { |
195 exceptionState.throwDOMException(SyntaxError, "The key provided is inval
id."); | 195 exceptionState.throwDOMException(SyntaxError, "The key provided is inval
id."); |
196 return; | 196 return; |
197 } | 197 } |
198 | 198 |
199 if (!key->length()) { | 199 if (!key->length()) { |
200 exceptionState.throwDOMException(TypeMismatchError, "The key provided is
invalid."); | 200 exceptionState.throwDOMException(TypeError, "The key provided is invalid
."); |
201 return; | 201 return; |
202 } | 202 } |
203 | 203 |
204 if (!webMediaPlayer) { | 204 if (!webMediaPlayer) { |
205 exceptionState.throwDOMException(InvalidStateError, "No media has been l
oaded."); | 205 exceptionState.throwDOMException(InvalidStateError, "No media has been l
oaded."); |
206 return; | 206 return; |
207 } | 207 } |
208 | 208 |
209 const unsigned char* initDataPointer = 0; | 209 const unsigned char* initDataPointer = 0; |
210 unsigned initDataLength = 0; | 210 unsigned initDataLength = 0; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 thisElement.setMediaKeysInternal(element, 0); | 344 thisElement.setMediaKeysInternal(element, 0); |
345 } | 345 } |
346 | 346 |
347 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp
tionModule(HTMLMediaElement& element) | 347 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp
tionModule(HTMLMediaElement& element) |
348 { | 348 { |
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 } // namespace WebCore | 353 } // namespace WebCore |
OLD | NEW |