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

Side by Side Diff: Source/core/xml/XMLHttpRequest.h

Issue 22842002: Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar. Created 7 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> 3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * Copyright (C) 2012 Intel Corporation 5 * Copyright (C) 2012 Intel Corporation
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void send(DOMFormData*, ExceptionState&); 101 void send(DOMFormData*, ExceptionState&);
102 void send(ArrayBuffer*, ExceptionState&); 102 void send(ArrayBuffer*, ExceptionState&);
103 void send(ArrayBufferView*, ExceptionState&); 103 void send(ArrayBufferView*, ExceptionState&);
104 void abort(); 104 void abort();
105 void setRequestHeader(const AtomicString& name, const String& value, Excepti onState&); 105 void setRequestHeader(const AtomicString& name, const String& value, Excepti onState&);
106 void overrideMimeType(const String& override); 106 void overrideMimeType(const String& override);
107 String getAllResponseHeaders(ExceptionState&) const; 107 String getAllResponseHeaders(ExceptionState&) const;
108 String getResponseHeader(const AtomicString& name, ExceptionState&) const; 108 String getResponseHeader(const AtomicString& name, ExceptionState&) const;
109 ScriptString responseText(ExceptionState&); 109 ScriptString responseText(ExceptionState&);
110 Document* responseXML(ExceptionState&); 110 Document* responseXML(ExceptionState&);
111 Blob* responseBlob(ExceptionState&); 111 Blob* responseBlob();
112 unsigned long timeout() const { return m_timeoutMilliseconds; } 112 unsigned long timeout() const { return m_timeoutMilliseconds; }
113 void setTimeout(unsigned long timeout, ExceptionState&); 113 void setTimeout(unsigned long timeout, ExceptionState&);
114 114
115 void sendForInspectorXHRReplay(PassRefPtr<FormData>, ExceptionState&); 115 void sendForInspectorXHRReplay(PassRefPtr<FormData>, ExceptionState&);
116 116
117 // Expose HTTP validation methods for other untrusted requests. 117 // Expose HTTP validation methods for other untrusted requests.
118 static bool isAllowedHTTPMethod(const String&); 118 static bool isAllowedHTTPMethod(const String&);
119 static String uppercaseKnownHTTPMethod(const String&); 119 static String uppercaseKnownHTTPMethod(const String&);
120 static bool isAllowedHTTPHeader(const String&); 120 static bool isAllowedHTTPHeader(const String&);
121 121
122 void setResponseType(const String&, ExceptionState&); 122 void setResponseType(const String&, ExceptionState&);
123 String responseType(); 123 String responseType();
124 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; } 124 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; }
125 125
126 // response attribute has custom getter. 126 // response attribute has custom getter.
127 ArrayBuffer* responseArrayBuffer(ExceptionState&); 127 ArrayBuffer* responseArrayBuffer();
128 128
129 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin eNumber; } 129 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin eNumber; }
130 void setLastSendURL(const String& url) { m_lastSendURL = url; } 130 void setLastSendURL(const String& url) { m_lastSendURL = url; }
131 131
132 XMLHttpRequestUpload* upload(); 132 XMLHttpRequestUpload* upload();
133 133
134 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); 134 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange);
135 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); 135 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
136 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 136 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
137 DEFINE_ATTRIBUTE_EVENT_LISTENER(load); 137 DEFINE_ATTRIBUTE_EVENT_LISTENER(load);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // An enum corresponding to the allowed string values for the responseType a ttribute. 236 // An enum corresponding to the allowed string values for the responseType a ttribute.
237 ResponseTypeCode m_responseTypeCode; 237 ResponseTypeCode m_responseTypeCode;
238 Timer<XMLHttpRequest> m_protectionTimer; 238 Timer<XMLHttpRequest> m_protectionTimer;
239 RefPtr<SecurityOrigin> m_securityOrigin; 239 RefPtr<SecurityOrigin> m_securityOrigin;
240 }; 240 };
241 241
242 } // namespace WebCore 242 } // namespace WebCore
243 243
244 #endif // XMLHttpRequest_h 244 #endif // XMLHttpRequest_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698