Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: Source/bindings/v8/Dictionary.cpp

Issue 200783002: Gamepad API: add support for gamepadconnected and gamepaddisconnected events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: layout fix: webexposed/global-constructors-listing Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/events/EventTypeNames.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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/custom/V8ArrayBufferViewCustom.h" 46 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
46 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" 47 #include "bindings/v8/custom/V8Uint8ArrayCustom.h"
48 #include "modules/gamepad/Gamepad.h"
47 #include "modules/indexeddb/IDBKeyRange.h" 49 #include "modules/indexeddb/IDBKeyRange.h"
48 #include "modules/speech/SpeechRecognitionError.h" 50 #include "modules/speech/SpeechRecognitionError.h"
49 #include "modules/speech/SpeechRecognitionResult.h" 51 #include "modules/speech/SpeechRecognitionResult.h"
50 #include "modules/speech/SpeechRecognitionResultList.h" 52 #include "modules/speech/SpeechRecognitionResultList.h"
51 #include "wtf/MathExtras.h" 53 #include "wtf/MathExtras.h"
52 54
53 #include "V8TextTrack.h" 55 #include "V8TextTrack.h"
54 #include "core/html/track/TrackBase.h" 56 #include "core/html/track/TrackBase.h"
55 57
56 #include "V8MediaStream.h" 58 #include "V8MediaStream.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu ltList>& value) const 503 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu ltList>& value) const
502 { 504 {
503 v8::Local<v8::Value> v8Value; 505 v8::Local<v8::Value> v8Value;
504 if (!getKey(key, v8Value)) 506 if (!getKey(key, v8Value))
505 return false; 507 return false;
506 508
507 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va lue); 509 value = V8SpeechRecognitionResultList::toNativeWithTypeCheck(m_isolate, v8Va lue);
508 return true; 510 return true;
509 } 511 }
510 512
513 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<Gamepad>& value) cons t
514 {
515 v8::Local<v8::Value> v8Value;
516 if (!getKey(key, v8Value))
517 return false;
518
519 value = V8Gamepad::toNativeWithTypeCheck(m_isolate, v8Value);
520 return true;
521 }
522
511 bool Dictionary::get(const String& key, RefPtr<MediaStream>& value) const 523 bool Dictionary::get(const String& key, RefPtr<MediaStream>& value) const
512 { 524 {
513 v8::Local<v8::Value> v8Value; 525 v8::Local<v8::Value> v8Value;
514 if (!getKey(key, v8Value)) 526 if (!getKey(key, v8Value))
515 return false; 527 return false;
516 528
517 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); 529 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value);
518 return true; 530 return true;
519 } 531 }
520 532
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 751
740 return *this; 752 return *this;
741 } 753 }
742 754
743 void Dictionary::ConversionContext::throwTypeError(const String& detail) 755 void Dictionary::ConversionContext::throwTypeError(const String& detail)
744 { 756 {
745 exceptionState().throwTypeError(detail); 757 exceptionState().throwTypeError(detail);
746 } 758 }
747 759
748 } // namespace WebCore 760 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/events/EventTypeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698