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

Side by Side Diff: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

Issue 14882009: Remove DOM prefix from several IDL interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/custom/V8FormDataCustom.cpp ('k') | Source/core/core.gypi » ('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) 2008, 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "V8XMLHttpRequest.h" 32 #include "V8XMLHttpRequest.h"
33 33
34 #include "V8ArrayBuffer.h" 34 #include "V8ArrayBuffer.h"
35 #include "V8ArrayBufferView.h" 35 #include "V8ArrayBufferView.h"
36 #include "V8Blob.h" 36 #include "V8Blob.h"
37 #include "V8DOMFormData.h"
38 #include "V8Document.h" 37 #include "V8Document.h"
38 #include "V8FormData.h"
39 #include "V8HTMLDocument.h" 39 #include "V8HTMLDocument.h"
40 #include "bindings/v8/V8Binding.h" 40 #include "bindings/v8/V8Binding.h"
41 #include "bindings/v8/V8Utilities.h" 41 #include "bindings/v8/V8Utilities.h"
42 #include "bindings/v8/custom/V8ArrayBufferCustom.h" 42 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
43 #include "core/dom/Document.h" 43 #include "core/dom/Document.h"
44 #include "core/inspector/InspectorInstrumentation.h" 44 #include "core/inspector/InspectorInstrumentation.h"
45 #include "core/page/Frame.h" 45 #include "core/page/Frame.h"
46 #include "core/workers/WorkerContext.h" 46 #include "core/workers/WorkerContext.h"
47 #include "core/xml/XMLHttpRequest.h" 47 #include "core/xml/XMLHttpRequest.h"
48 #include "wtf/ArrayBuffer.h" 48 #include "wtf/ArrayBuffer.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 else if (isDocumentType(arg, args.GetIsolate(), currentWorldType)) { 186 else if (isDocumentType(arg, args.GetIsolate(), currentWorldType)) {
187 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 187 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
188 Document* document = V8Document::toNative(object); 188 Document* document = V8Document::toNative(object);
189 ASSERT(document); 189 ASSERT(document);
190 xmlHttpRequest->send(document, ec); 190 xmlHttpRequest->send(document, ec);
191 } else if (V8Blob::HasInstance(arg, args.GetIsolate(), currentWorldType) ) { 191 } else if (V8Blob::HasInstance(arg, args.GetIsolate(), currentWorldType) ) {
192 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 192 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
193 Blob* blob = V8Blob::toNative(object); 193 Blob* blob = V8Blob::toNative(object);
194 ASSERT(blob); 194 ASSERT(blob);
195 xmlHttpRequest->send(blob, ec); 195 xmlHttpRequest->send(blob, ec);
196 } else if (V8DOMFormData::HasInstance(arg, args.GetIsolate(), currentWor ldType)) { 196 } else if (V8FormData::HasInstance(arg, args.GetIsolate(), currentWorldT ype)) {
197 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 197 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
198 DOMFormData* domFormData = V8DOMFormData::toNative(object); 198 DOMFormData* domFormData = V8FormData::toNative(object);
199 ASSERT(domFormData); 199 ASSERT(domFormData);
200 xmlHttpRequest->send(domFormData, ec); 200 xmlHttpRequest->send(domFormData, ec);
201 } else if (V8ArrayBuffer::HasInstance(arg, args.GetIsolate(), currentWor ldType)) { 201 } else if (V8ArrayBuffer::HasInstance(arg, args.GetIsolate(), currentWor ldType)) {
202 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 202 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
203 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object); 203 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object);
204 ASSERT(arrayBuffer); 204 ASSERT(arrayBuffer);
205 xmlHttpRequest->send(arrayBuffer, ec); 205 xmlHttpRequest->send(arrayBuffer, ec);
206 } else if (V8ArrayBufferView::HasInstance(arg, args.GetIsolate(), curren tWorldType)) { 206 } else if (V8ArrayBufferView::HasInstance(arg, args.GetIsolate(), curren tWorldType)) {
207 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 207 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
208 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(objec t); 208 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(objec t);
209 ASSERT(arrayBufferView); 209 ASSERT(arrayBufferView);
210 xmlHttpRequest->send(arrayBufferView, ec); 210 xmlHttpRequest->send(arrayBufferView, ec);
211 } else 211 } else
212 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec); 212 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
213 } 213 }
214 214
215 if (ec) 215 if (ec)
216 return setDOMException(ec, args.GetIsolate()); 216 return setDOMException(ec, args.GetIsolate());
217 217
218 return v8::Undefined(); 218 return v8::Undefined();
219 } 219 }
220 220
221 } // namespace WebCore 221 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8FormDataCustom.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698