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

Side by Side Diff: remoting/webapp/crd/js/xhr_proxy.js

Issue 983023002: [Chromoting] Use compact notation for javascript @private types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « remoting/webapp/crd/js/window_frame.js ('k') | remoting/webapp/crd/js/xmpp_connection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright 2013 The Chromium Authors. All rights reserved. 1 /* Copyright 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * @fileoverview 7 * @fileoverview
8 * The sandbox isn't allowed to make XHRs, so they have to be proxied to the 8 * The sandbox isn't allowed to make XHRs, so they have to be proxied to the
9 * main process. The XMLHttpRequestProxy class is API-compatible with the 9 * main process. The XMLHttpRequestProxy class is API-compatible with the
10 * XMLHttpRequest class, but forwards the requests to the main process where 10 * XMLHttpRequest class, but forwards the requests to the main process where
(...skipping 10 matching lines...) Expand all
21 'use strict'; 21 'use strict';
22 22
23 /** @suppress {duplicate} */ 23 /** @suppress {duplicate} */
24 var remoting = remoting || {}; 24 var remoting = remoting || {};
25 25
26 /** 26 /**
27 * @constructor 27 * @constructor
28 * @extends {XMLHttpRequest} 28 * @extends {XMLHttpRequest}
29 */ 29 */
30 remoting.XMLHttpRequestProxy = function() { 30 remoting.XMLHttpRequestProxy = function() {
31 /** 31 /** @type {{headers: Object}} */
32 * @type {{headers: Object}}
33 */
34 this.sandbox_ipc = { 32 this.sandbox_ipc = {
35 headers: {} 33 headers: {}
36 }; 34 };
37 /** 35 /** @private {number} */
38 * @type {number}
39 * @private
40 */
41 this.xhr_id_ = -1; 36 this.xhr_id_ = -1;
42 }; 37 };
43 38
44 remoting.XMLHttpRequestProxy.prototype.open = function( 39 remoting.XMLHttpRequestProxy.prototype.open = function(
45 method, url, async, user, password) { 40 method, url, async, user, password) {
46 if (!async) { 41 if (!async) {
47 console.warn('Synchronous XHRs are not supported.'); 42 console.warn('Synchronous XHRs are not supported.');
48 } 43 }
49 this.sandbox_ipc.method = method; 44 this.sandbox_ipc.method = method;
50 this.sandbox_ipc.url = url.toString(); 45 this.sandbox_ipc.url = url.toString();
(...skipping 29 matching lines...) Expand all
80 75
81 remoting.XMLHttpRequestProxy.prototype.overrideMimeType = function() { 76 remoting.XMLHttpRequestProxy.prototype.overrideMimeType = function() {
82 console.error('Sandbox: unproxied overrideMimeType called.'); 77 console.error('Sandbox: unproxied overrideMimeType called.');
83 }; 78 };
84 79
85 remoting.XMLHttpRequestProxy.prototype.UNSENT = 0; 80 remoting.XMLHttpRequestProxy.prototype.UNSENT = 0;
86 remoting.XMLHttpRequestProxy.prototype.OPENED = 1; 81 remoting.XMLHttpRequestProxy.prototype.OPENED = 1;
87 remoting.XMLHttpRequestProxy.prototype.HEADERS_RECEIVED = 2; 82 remoting.XMLHttpRequestProxy.prototype.HEADERS_RECEIVED = 2;
88 remoting.XMLHttpRequestProxy.prototype.LOADING = 3; 83 remoting.XMLHttpRequestProxy.prototype.LOADING = 3;
89 remoting.XMLHttpRequestProxy.prototype.DONE = 4; 84 remoting.XMLHttpRequestProxy.prototype.DONE = 4;
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/window_frame.js ('k') | remoting/webapp/crd/js/xmpp_connection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698