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

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

Issue 139803012: Move speech module over to Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More namespace tweaks for clang Created 6 years, 10 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 | « no previous file | Source/bindings/v8/Dictionary.cpp » ('j') | Source/heap/Handle.h » ('J')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool get(const String&, unsigned long long&) const; 81 bool get(const String&, unsigned long long&) const;
82 bool get(const String&, RefPtr<DOMWindow>&) const; 82 bool get(const String&, RefPtr<DOMWindow>&) const;
83 bool get(const String&, RefPtr<Storage>&) const; 83 bool get(const String&, RefPtr<Storage>&) const;
84 bool get(const String&, MessagePortArray&) const; 84 bool get(const String&, MessagePortArray&) const;
85 bool get(const String&, RefPtr<Uint8Array>&) const; 85 bool get(const String&, RefPtr<Uint8Array>&) const;
86 bool get(const String&, RefPtr<ArrayBufferView>&) const; 86 bool get(const String&, RefPtr<ArrayBufferView>&) const;
87 bool get(const String&, RefPtr<MIDIPort>&) const; 87 bool get(const String&, RefPtr<MIDIPort>&) const;
88 bool get(const String&, RefPtr<MediaKeyError>&) const; 88 bool get(const String&, RefPtr<MediaKeyError>&) const;
89 bool get(const String&, RefPtr<TrackBase>&) const; 89 bool get(const String&, RefPtr<TrackBase>&) const;
90 bool get(const String&, RefPtr<SpeechRecognitionError>&) const; 90 bool get(const String&, RefPtr<SpeechRecognitionError>&) const;
91 bool get(const String&, RefPtr<SpeechRecognitionResult>&) const; 91 bool get(const String&, RefPtrWillBeRawPtr<SpeechRecognitionResult>&) const;
92 bool get(const String&, RefPtr<SpeechRecognitionResultList>&) const; 92 bool get(const String&, RefPtrWillBeRawPtr<SpeechRecognitionResultList>&) co nst;
93 bool get(const String&, RefPtr<MediaStream>&) const; 93 bool get(const String&, RefPtr<MediaStream>&) const;
94 bool get(const String&, RefPtr<EventTarget>&) const; 94 bool get(const String&, RefPtr<EventTarget>&) const;
95 bool get(const String&, HashSet<AtomicString>&) const; 95 bool get(const String&, HashSet<AtomicString>&) const;
96 bool get(const String&, Dictionary&) const; 96 bool get(const String&, Dictionary&) const;
97 bool get(const String&, Vector<String>&) const; 97 bool get(const String&, Vector<String>&) const;
98 bool get(const String&, ArrayValue&) const; 98 bool get(const String&, ArrayValue&) const;
99 bool get(const String&, RefPtr<DOMError>&) const; 99 bool get(const String&, RefPtr<DOMError>&) const;
100 bool get(const String&, OwnPtr<VoidCallback>&) const; 100 bool get(const String&, OwnPtr<VoidCallback>&) const;
101 bool get(const String&, v8::Local<v8::Value>&) const; 101 bool get(const String&, v8::Local<v8::Value>&) const;
102 102
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 template<typename IntegralType> 155 template<typename IntegralType>
156 bool convert(ConversionContext &, const String&, IntegralType&) const; 156 bool convert(ConversionContext &, const String&, IntegralType&) const;
157 bool convert(ConversionContext &, const String&, MessagePortArray&) const; 157 bool convert(ConversionContext &, const String&, MessagePortArray&) const;
158 bool convert(ConversionContext &, const String&, HashSet<AtomicString>&) con st; 158 bool convert(ConversionContext &, const String&, HashSet<AtomicString>&) con st;
159 bool convert(ConversionContext &, const String&, Dictionary&) const; 159 bool convert(ConversionContext &, const String&, Dictionary&) const;
160 bool convert(ConversionContext &, const String&, Vector<String>&) const; 160 bool convert(ConversionContext &, const String&, Vector<String>&) const;
161 bool convert(ConversionContext &, const String&, ArrayValue&) const; 161 bool convert(ConversionContext &, const String&, ArrayValue&) const;
162 template<typename T> 162 template<typename T>
163 bool convert(ConversionContext &, const String&, RefPtr<T>&) const; 163 bool convert(ConversionContext &, const String&, RefPtr<T>&) const;
164 template<typename T>
165 bool convert(ConversionContext &, const String&, RawPtr<T>&) const;
haraken 2014/02/12 05:18:45 Nit: Unnecessary space before '&'.
sof 2014/02/12 07:48:51 Well spotted, fixed.
164 166
165 template<typename StringType> 167 template<typename StringType>
166 bool getStringType(const String&, StringType&) const; 168 bool getStringType(const String&, StringType&) const;
167 169
168 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; 170 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const;
169 bool getOwnPropertyNames(Vector<String>&) const; 171 bool getOwnPropertyNames(Vector<String>&) const;
170 172
171 bool getWithUndefinedOrNullCheck(const String&, String&) const; 173 bool getWithUndefinedOrNullCheck(const String&, String&) const;
172 174
173 bool hasProperty(const String&) const; 175 bool hasProperty(const String&) const;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 316
315 v8::Local<v8::Value> v8Value; 317 v8::Local<v8::Value> v8Value;
316 getKey(key, v8Value); 318 getKey(key, v8Value);
317 if (context.isNullable() && WebCore::isUndefinedOrNull(v8Value)) 319 if (context.isNullable() && WebCore::isUndefinedOrNull(v8Value))
318 return true; 320 return true;
319 321
320 context.throwTypeError(ExceptionMessages::incorrectPropertyType(key, "does n ot have a " + context.typeName() + " type.")); 322 context.throwTypeError(ExceptionMessages::incorrectPropertyType(key, "does n ot have a " + context.typeName() + " type."));
321 return false; 323 return false;
322 } 324 }
323 325
326 template<typename T> bool Dictionary::convert(ConversionContext& context, const String& key, RawPtr<T>& value) const
haraken 2014/02/12 05:18:45 Nit: It's a shame that we have to duplicate the co
sof 2014/02/12 07:48:51 Seems ripe for that; we can handle that separately
327 {
328 ConversionContextScope scope(context);
329
330 if (!get(key, value))
331 return true;
332
333 if (value)
334 return true;
335
336 v8::Local<v8::Value> v8Value;
337 getKey(key, v8Value);
338 if (context.isNullable() && WebCore::isUndefinedOrNull(v8Value))
339 return true;
340
341 context.throwTypeError(ExceptionMessages::incorrectPropertyType(key, "does n ot have a " + context.typeName() + " type."));
342 return false;
343 }
344
324 } 345 }
325 346
326 #endif // Dictionary_h 347 #endif // Dictionary_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/Dictionary.cpp » ('j') | Source/heap/Handle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698