Searched refs:xhr (Results 1 - 25 of 66) sorted by relevance

123

/external/chromium_org/chrome/common/extensions/docs/examples/extensions/buildbot/
H A Dutils.js11 var xhr = new XMLHttpRequest();
13 // WebKit doesn't handle xhr.responseType = "json" as of Chrome 25.
14 xhr.responseType = "text";
16 xhr.responseType = responseType;
18 xhr.onreadystatechange = function(state) {
19 if (xhr.readyState == 4) {
20 if (xhr.status == 200) {
22 responseType == "json" ? JSON.parse(xhr.response) : xhr.response;
26 opt_errorStatusCallback(xhr
[all...]
/external/chromium_org/remoting/webapp/
H A Dxhr.js17 remoting.xhr = remoting.xhr || {};
25 remoting.xhr.urlencodeParamHash = function(paramHash) {
52 remoting.xhr.get = function(url, onDone, opt_parameters, opt_headers,
54 return remoting.xhr.doMethod('GET', url, onDone, opt_parameters,
73 remoting.xhr.post = function(url, onDone, opt_parameters, opt_headers,
75 return remoting.xhr.doMethod('POST', url, onDone, opt_parameters,
94 remoting.xhr.remove = function(url, onDone, opt_parameters, opt_headers,
96 return remoting.xhr.doMethod('DELETE', url, onDone, opt_parameters,
115 remoting.xhr
[all...]
H A Doauth2_api.js80 /** @param {XMLHttpRequest} xhr */
81 var onResponse = function(xhr) {
82 if (xhr.status == 200) {
87 var tokens = JSON.parse(xhr.responseText);
95 console.error('Failed to refresh token. Status: ' + xhr.status +
96 ' response: ' + xhr.responseText);
97 onError(remoting.OAuth2Api.interpretXhrStatus_(xhr.status));
108 remoting.xhr.post(remoting.OAuth2Api.getOAuth2TokenEndpoint_(),
128 /** @param {XMLHttpRequest} xhr */
129 var onResponse = function(xhr) {
[all...]
H A Dwcs_sandbox_container.js209 var xhr = new XMLHttpRequest;
210 this.pendingXhrs_[id] = xhr;
211 xhr.open(method, url, true, user, password);
216 xhr.setRequestHeader(header, headers[header]);
219 xhr.onreadystatechange = this.onReadyStateChange_.bind(this, id);
220 xhr.send(data);
229 var xhr = this.pendingXhrs_[id]
230 if (!xhr) {
235 xhr.abort();
247 * @param {XMLHttpRequest} xhr Th
[all...]
H A Dwcs_loader.js120 var xhr = new XMLHttpRequest();
121 xhr.onreadystatechange = function() {
122 if (xhr.readyState != 4) {
125 if (xhr.status == 200) {
129 switch (xhr.status) {
142 xhr.open('GET',
145 xhr.send(null);
H A Dwcs_sandbox_content.js103 var xhr = event.data['xhr'];
104 if (xhr === undefined) {
105 console.error('xhrStateChange: missing xhr');
108 for (var member in xhr) {
109 pendingXhr[member] = xhr[member];
111 if (xhr.readyState == 4) {
158 * @param {remoting.XMLHttpRequestProxy} xhr The XHR to send.
161 remoting.WcsSandboxContent.prototype.sendXhr = function(xhr) {
163 this.pendingXhrs_[id] = xhr;
[all...]
/external/chromium_org/chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/
H A Dbackground.js12 var xhr = new XMLHttpRequest();
13 xhr.open("HEAD", link.href, true);
14 xhr.onreadystatechange = function() {
15 if (xhr.readyState < xhr.HEADERS_RECEIVED || xhr.processed)
17 if (!xhr.status || xhr.status >= 400) {
21 status: xhr.statusText
24 xhr
[all...]
/external/chromium_org/native_client_sdk/src/resources/
H A Dbackground.js27 var xhr = new XMLHttpRequest();
28 xhr.open('GET', 'run_package_config', true);
29 xhr.onload = function() {
33 xhr.onerror = function() {
37 xhr.send();
/external/chromium_org/chrome/browser/resources/chromeos/wallpaper_manager/js/
H A Dutil.js54 var xhr;
56 xhr = opt_xhr;
58 xhr = new XMLHttpRequest();
64 xhr.addEventListener('load', function(e) {
71 xhr.addEventListener('error', onFailure);
72 xhr.open('GET', url, true);
73 xhr.responseType = type;
74 xhr.send(null);
95 self.fetchURL(url, 'arraybuffer', function(xhr) {
96 if (xhr
[all...]
/external/chromium_org/chrome/renderer/resources/extensions/
H A Dgreasemonkey_api.js26 function setupEvent(xhr, url, eventName, callback) {
27 xhr[eventName] = function () {
28 var isComplete = xhr.readyState == 4;
30 responseText: xhr.responseText,
31 readyState: xhr.readyState,
32 responseHeaders: isComplete ? xhr.getAllResponseHeaders() : "",
33 status: isComplete ? xhr.status : 0,
34 statusText: isComplete ? xhr.statusText : "",
41 var xhr = new XMLHttpRequest();
46 setupEvent(xhr, detail
[all...]
/external/chromium/chrome/common/extensions/docs/js/
H A Dbootstrap.js2 var xhr = new XMLHttpRequest();
4 xhr.onreadystatechange = function() {};
5 xhr.onerror = function() {};
6 xhr.open("GET", "nothing.xml", true);
7 xhr.send(null);
12 xhr.abort();
/external/chromium_org/third_party/WebKit/ManualTests/inspector-wrappers/
H A Dinspector-wrappers-test-utils.js13 xhr(win);
16 function xhr(win) { function
17 var xhr = new win.XMLHttpRequest();
22 xhr.open("GET", url, false);
23 xhr.send();
24 truealert("Result:\n\n" + xhr.responseText);
/external/chromium_org/third_party/WebKit/Tools/GardeningServer/scripts/
H A Dnet.js40 var xhr = new XMLHttpRequest();
43 xhr.open(method, options.url, async);
44 xhr.onload = function() {
45 if (xhr.status == 200 && options.success)
46 options.success(xhr.responseText);
47 else if (xhr.status != 200 && options.error)
50 xhr.onerror = function() {
56 xhr.setRequestHeader("content-type","application/x-www-form-urlencoded");
57 xhr.send(data);
/external/chromium_org/chrome/common/extensions/docs/examples/api/permissions/extension-questions/
H A Dpopup.js25 var xhr = new XMLHttpRequest();
26 xhr.open('GET', URL);
27 xhr.addEventListener('load', function(e) {
28 var result = xhr.responseText;
31 xhr.send();
/external/chromium_org/chrome/common/extensions/docs/examples/howto/contentscript_xhr/
H A Dcontentscript.js15 var xhr = new XMLHttpRequest();
16 xhr.onreadystatechange = function(data) {
17 if (xhr.readyState == 4) {
18 if (xhr.status == 200) {
19 var data = JSON.parse(xhr.responseText);
29 xhr.open('GET', url, true);
30 xhr.send();
/external/chromium_org/chrome/third_party/chromevox/closure/
H A Dclosure_preinit.js81 var xhr = new XMLHttpRequest();
83 xhr.onreadystatechange = function() {
84 if (xhr.readyState == 4) {
85 var scriptText = xhr.responseText;
94 xhr.open('GET', url, false);
95 xhr.send(null);
/external/chromium_org/tools/page_cycler/webpagereplay/extension/
H A Dstart.js21 var xhr = new XMLHttpRequest();
23 xhr.open("GET", kStatusUrl, useAsync);
24 xhr.onreadystatechange = function() {
25 if (xhr.readyState == 4 && xhr.status == 200) {
26 var status = JSON.parse(xhr.responseText);
32 xhr.send();
/external/chromium_org/chrome/browser/resources/chromeos/login/
H A Dresource_loader.js106 * @param {XMLHttpRequest} xhr The XHR object.
108 function isSuccessful(url, xhr) {
110 return xhr.readyState == 4 &&
111 (xhr.status == 200 || fileURL.test(url) && xhr.status == 0);
123 var xhr = new XMLHttpRequest();
124 xhr.open('GET', html.url);
125 xhr.onreadystatechange = function() {
126 if (isSuccessful(html.url, xhr)) {
131 xhr
[all...]
/external/chromium_org/content/test/data/media/
H A Dmedia_source_utils.js43 var xhr = new XMLHttpRequest();
44 xhr.open('GET', mediaFile);
45 xhr.responseType = 'arraybuffer';
46 xhr.addEventListener('load', function(e) {
61 xhr.send();
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/data/rebaselineserver/
H A Dutil.js53 var xhr = new XMLHttpRequest();
54 xhr.open('GET', url);
55 xhr.addEventListener('load', function() { callback(xhr.responseText); });
56 xhr.send();
/external/chromium/chrome/browser/resources/picasaweb_uploader/js/
H A Dpicasa_client.js165 function xhrCallback(xhr) {
166 if (xhr.status == 200) {
167 this.authToken_ = this.extractResponseField_(xhr.responseText, 'Auth');
171 var response = xhr.responseText;
234 var xhr = new XMLHttpRequest();
235 xhr.onreadystatechange = function() {
236 if (xhr.readyState == 4) {
237 callback(xhr);
240 xhr.open(method, url, true);
244 xhr
[all...]
/external/chromium_org/third_party/WebKit/Tools/TestResultServer/static-dashboards/
H A Dloader.js44 var xhr = new XMLHttpRequest();
45 xhr.open('GET', url, true);
47 xhr.overrideMimeType('text/plain; charset=x-user-defined');
48 xhr.onreadystatechange = function(e) {
49 if (xhr.readyState == 4) {
50 if (xhr.status == 200)
51 success(xhr);
53 error(xhr);
56 xhr.send();
138 partial(function(loader, builderName, xhr) {
[all...]
/external/chromium_org/chrome/browser/resources/print_preview/
H A Dcloud_print_interface.js302 var xhr = new XMLHttpRequest();
303 xhr.open(method, url, true);
304 xhr.withCredentials =
307 xhr.setRequestHeader(header, headers[header]);
310 return new CloudPrintRequest(xhr, body, origin, callback);
334 request.xhr.onreadystatechange =
336 request.xhr.send(request.body);
348 errorEvent.status = request.xhr.status;
349 if (request.xhr.status == 200) {
374 request.xhr
[all...]
/external/chromium_org/tools/perf/page_sets/mse_cases/
H A Dstartup_test.js160 this.xhr = new XMLHttpRequest();
165 this.xhr.addEventListener('loadend', this.onLoadEnd.bind(this));
166 this.xhr.open('GET', this.url);
167 this.xhr.setRequestHeader('Range', 'bytes=' + this.startOffset + '-' +
169 this.xhr.responseType = 'arraybuffer';
170 this.xhr.send();
187 if (!this.xhr.response || !this.sourceBuffer)
195 this.sourceBuffer.appendBuffer(this.xhr.response);
197 this.sourceBuffer.append(new Uint8Array(this.xhr.response));
201 this.xhr
[all...]
/external/chromium_org/chrome/third_party/chromevox/chromevox/background/mathmaps/
H A Dmath_map.js195 var xhr = new XMLHttpRequest();
196 xhr.open('GET', url, false);
197 xhr.send();
198 return xhr.responseText;

Completed in 1695 milliseconds

123