| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "bindings/v8/Dictionary.h" | 27 #include "bindings/v8/Dictionary.h" |
| 28 | 28 |
| 29 #include "V8DOMError.h" | 29 #include "V8DOMError.h" |
| 30 #include "V8EventTarget.h" | 30 #include "V8EventTarget.h" |
| 31 #include "V8Gamepad.h" |
| 31 #include "V8IDBKeyRange.h" | 32 #include "V8IDBKeyRange.h" |
| 32 #include "V8MIDIPort.h" | 33 #include "V8MIDIPort.h" |
| 33 #include "V8MediaKeyError.h" | 34 #include "V8MediaKeyError.h" |
| 34 #include "V8MessagePort.h" | 35 #include "V8MessagePort.h" |
| 35 #include "V8SpeechRecognitionError.h" | 36 #include "V8SpeechRecognitionError.h" |
| 36 #include "V8SpeechRecognitionResult.h" | 37 #include "V8SpeechRecognitionResult.h" |
| 37 #include "V8SpeechRecognitionResultList.h" | 38 #include "V8SpeechRecognitionResultList.h" |
| 38 #include "V8Storage.h" | 39 #include "V8Storage.h" |
| 39 #include "V8VoidCallback.h" | 40 #include "V8VoidCallback.h" |
| 40 #include "V8Window.h" | 41 #include "V8Window.h" |
| 41 #include "bindings/v8/ArrayValue.h" | 42 #include "bindings/v8/ArrayValue.h" |
| 42 #include "bindings/v8/ExceptionMessages.h" | 43 #include "bindings/v8/ExceptionMessages.h" |
| 43 #include "bindings/v8/ExceptionState.h" | 44 #include "bindings/v8/ExceptionState.h" |
| 44 #include "bindings/v8/V8Binding.h" | 45 #include "bindings/v8/V8Binding.h" |
| 45 #include "bindings/v8/V8Utilities.h" | 46 #include "bindings/v8/V8Utilities.h" |
| 46 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" | 47 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" |
| 47 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" | 48 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" |
| 49 #include "modules/gamepad/Gamepad.h" |
| 48 #include "modules/indexeddb/IDBKeyRange.h" | 50 #include "modules/indexeddb/IDBKeyRange.h" |
| 49 #include "modules/speech/SpeechRecognitionError.h" | 51 #include "modules/speech/SpeechRecognitionError.h" |
| 50 #include "modules/speech/SpeechRecognitionResult.h" | 52 #include "modules/speech/SpeechRecognitionResult.h" |
| 51 #include "modules/speech/SpeechRecognitionResultList.h" | 53 #include "modules/speech/SpeechRecognitionResultList.h" |
| 52 #include "wtf/MathExtras.h" | 54 #include "wtf/MathExtras.h" |
| 53 | 55 |
| 54 #include "V8TextTrack.h" | 56 #include "V8TextTrack.h" |
| 55 #include "core/html/track/TrackBase.h" | 57 #include "core/html/track/TrackBase.h" |
| 56 | 58 |
| 57 #include "V8MediaStream.h" | 59 #include "V8MediaStream.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu
ltList>& value) const | 504 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu
ltList>& value) const |
| 503 { | 505 { |
| 504 v8::Local<v8::Value> v8Value; | 506 v8::Local<v8::Value> v8Value; |
| 505 if (!getKey(key, v8Value)) | 507 if (!getKey(key, v8Value)) |
| 506 return false; | 508 return false; |
| 507 | 509 |
| 508 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va
lue); | 510 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va
lue); |
| 509 return true; | 511 return true; |
| 510 } | 512 } |
| 511 | 513 |
| 514 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<Gamepad>& value) cons
t |
| 515 { |
| 516 v8::Local<v8::Value> v8Value; |
| 517 if (!getKey(key, v8Value)) |
| 518 return false; |
| 519 |
| 520 value = V8Gamepad::toNativeWithTypeCheck(m_isolate, v8Value); |
| 521 return true; |
| 522 } |
| 523 |
| 512 bool Dictionary::get(const String& key, RefPtr<MediaStream>& value) const | 524 bool Dictionary::get(const String& key, RefPtr<MediaStream>& value) const |
| 513 { | 525 { |
| 514 v8::Local<v8::Value> v8Value; | 526 v8::Local<v8::Value> v8Value; |
| 515 if (!getKey(key, v8Value)) | 527 if (!getKey(key, v8Value)) |
| 516 return false; | 528 return false; |
| 517 | 529 |
| 518 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); | 530 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); |
| 519 return true; | 531 return true; |
| 520 } | 532 } |
| 521 | 533 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 752 |
| 741 return *this; | 753 return *this; |
| 742 } | 754 } |
| 743 | 755 |
| 744 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 756 void Dictionary::ConversionContext::throwTypeError(const String& detail) |
| 745 { | 757 { |
| 746 exceptionState().throwTypeError(detail); | 758 exceptionState().throwTypeError(detail); |
| 747 } | 759 } |
| 748 | 760 |
| 749 } // namespace WebCore | 761 } // namespace WebCore |
| OLD | NEW |