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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 // FIXME: this will need to be changed so it can also return an AudioTra
ck or a VideoTrack once | 472 // FIXME: this will need to be changed so it can also return an AudioTra
ck or a VideoTrack once |
473 // we add them. | 473 // we add them. |
474 v8::Handle<v8::Object> track = V8TextTrack::findInstanceInPrototypeChain
(wrapper, m_isolate); | 474 v8::Handle<v8::Object> track = V8TextTrack::findInstanceInPrototypeChain
(wrapper, m_isolate); |
475 if (!track.IsEmpty()) | 475 if (!track.IsEmpty()) |
476 source = V8TextTrack::toNative(track); | 476 source = V8TextTrack::toNative(track); |
477 } | 477 } |
478 value = source; | 478 value = source; |
479 return true; | 479 return true; |
480 } | 480 } |
481 | 481 |
482 bool Dictionary::get(const String& key, RefPtrWillBeMember<SpeechRecognitionErro
r>& value) const | 482 bool Dictionary::get(const String& key, Member<SpeechRecognitionError>& value) c
onst |
483 { | 483 { |
484 v8::Local<v8::Value> v8Value; | 484 v8::Local<v8::Value> v8Value; |
485 if (!getKey(key, v8Value)) | 485 if (!getKey(key, v8Value)) |
486 return false; | 486 return false; |
487 | 487 |
488 value = V8SpeechRecognitionError::toNativeWithTypeCheck(m_isolate, v8Value); | 488 value = V8SpeechRecognitionError::toNativeWithTypeCheck(m_isolate, v8Value); |
489 return true; | 489 return true; |
490 } | 490 } |
491 | 491 |
492 bool Dictionary::get(const String& key, RefPtrWillBeMember<SpeechRecognitionResu
lt>& value) const | 492 bool Dictionary::get(const String& key, Member<SpeechRecognitionResult>& value)
const |
493 { | 493 { |
494 v8::Local<v8::Value> v8Value; | 494 v8::Local<v8::Value> v8Value; |
495 if (!getKey(key, v8Value)) | 495 if (!getKey(key, v8Value)) |
496 return false; | 496 return false; |
497 | 497 |
498 value = V8SpeechRecognitionResult::toNativeWithTypeCheck(m_isolate, v8Value)
; | 498 value = V8SpeechRecognitionResult::toNativeWithTypeCheck(m_isolate, v8Value)
; |
499 return true; | 499 return true; |
500 } | 500 } |
501 | 501 |
502 bool Dictionary::get(const String& key, RefPtrWillBeMember<SpeechRecognitionResu
ltList>& value) const | 502 bool Dictionary::get(const String& key, Member<SpeechRecognitionResultList>& val
ue) const |
503 { | 503 { |
504 v8::Local<v8::Value> v8Value; | 504 v8::Local<v8::Value> v8Value; |
505 if (!getKey(key, v8Value)) | 505 if (!getKey(key, v8Value)) |
506 return false; | 506 return false; |
507 | 507 |
508 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va
lue); | 508 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va
lue); |
509 return true; | 509 return true; |
510 } | 510 } |
511 | 511 |
512 bool Dictionary::get(const String& key, Member<Gamepad>& value) const | 512 bool Dictionary::get(const String& key, Member<Gamepad>& value) const |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 747 |
748 return *this; | 748 return *this; |
749 } | 749 } |
750 | 750 |
751 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 751 void Dictionary::ConversionContext::throwTypeError(const String& detail) |
752 { | 752 { |
753 exceptionState().throwTypeError(detail); | 753 exceptionState().throwTypeError(detail); |
754 } | 754 } |
755 | 755 |
756 } // namespace WebCore | 756 } // namespace WebCore |
OLD | NEW |